MODULE: Easy mirrors 2.0

Started by Monsieur OUXX, Thu 11/07/2013 10:24:45

Previous topic - Next topic

Cassiebsg

Quote from: Mehrdad on Fri 01/08/2014 15:07:59
I see a little bug:

Now that you mentioned it, I noticed that one when I was moving around, but then I couldn't reproduce it, and thought that maybe it was me who saw it wrong...
There are those who believe that life here began out there...

Ghost

#21
Quote from: Cassiebsg on Fri 01/08/2014 19:28:47
Quote from: Mehrdad on Fri 01/08/2014 15:07:59
I see a little bug:
Now that you mentioned it, I noticed that one when I was moving around, but then I couldn't reproduce it, and thought that maybe it was me who saw it wrong...

Could be a not-correctly-assigned view though. I set up a mirror scene in a Game-in-production, and didn't get that bug with fully assigned views. In the "ocean" scene it is stated that some views are "lazily assigned".

AnasAbdin

Quote from: Mehrdad on Fri 01/08/2014 15:07:59
I see a little bug:


I don't think so. With all the dangers around.. he grew a pair of eyes in the back of his head...

I'll see my way out.

Monsieur OUXX

#23
Hey guys, it's not a bug*.

As explained in the demo game (when you click on Brandon to get his explanations) :

"You might notice that sometimes, the reflection does not match the character sprite. That's not because of the module. That's because our sprite artist was too lazy to draw an original sprite 0 for some loops".

In the screenshot above, all sprites 0 for loops "up,down,left and right" of view "idle" are the same. Hence the glitch! But then again it's not because of the module.

* unless proven otherwise.
 

Orca

Would it be ok to use this module in my commercial game? I dont see any licensing documentation for your module.

Monsieur OUXX

Quote from: Orca on Sat 28/02/2015 13:02:09
Would it be ok to use this module in my commercial game? I dont see any licensing documentation for your module.

I believe the files headers say it's absolutely free to use.
But anyway: yes, you may use it, as long as you credit "Monsieur Ouxx and the 'Indiana Jones and the Seven Cities of Gold' contributors" somewhere in your manual or on-screen crédits.
 

Orca

no probs, ill make sure that i credit you and Indiana Jones and the Seven Cities of Gold' contributors in the credits and in the game readme/manual docs.

Alen101

It seems to be a cool module, but it gives me an arror in this line:
   LabelDebug.Text = String.Format("transp=%d", c.Transparency);
Any ideas of what could be happening?

Ive downloaded the zip file with the Indy game, then enter the game and export the module Mirror2.0
Then go to my game and import it, i did that because i was not able to find the .scm file.
Maybe some archive in the indy game folder i have to copy to my game folder?
???


Alen101


I keep getting this error in the mirror module, any ideas?
anything would help!

The error is in this line of the mirror2.0.asc code:
Code: ags

LabelDebug.Text = String.Format("transp=%d", c.Transparency);


this is the output message:

mirror2.0.asc(461): Error (line 461): Undefined token 'LabelDebug'

Calin Leafshade

It's trying to set a label for debugging. Presumably the module author left it in by mistake.

Just remove that line.

Alen101


eri0o

#31
I have the error:

Failed to save room room1.crm; details below
guiscript.ash(145): Error (line 145): function 'Character::FaceDirection' is already defined


And in line 145, I see the following code:
Code: ags
    import function FaceDirection (this Character*, eDirection dir);



--- EDIT ---

Ok, I deleted FaceDirection definition from both guiscript.asc and guiscript.ash . Now it works! :]


--- EDIT 2 ---

Does someone have any idea on how to have eSymmetryHoriz that also flips horizontally the image? My character isn't horizontally symmetric.

Made my own small hack for now...

Code: ags
Character* c; //the reflection will be...
  if (data[mir_index].c != null) { //...the mirror's own. It looks exactly like the player
    c = data[mir_index].c;
    if(player.View != 1){
      c.ChangeView(player.View);
    } else {
      c.ChangeView(49);
    }
  }

Monsieur OUXX

Update : edited first post to recommend using late_repeatedly_execute_always
 

Loslem

Hey OUXX :)

You stated it would be easy to mirror more characters...
What would one have to do, to make that work?

croquetasesina


Monsieur OUXX

As per request, I've updated the download link, it's now repaired.

Quote from: eri0o on Sat 06/05/2017 00:12:25
I have the error:
function 'Character::FaceDirection' is already defined

That's because this module was written before AGS finally included a built-in FaceDirection function. Therefore, the module has its own function with the same name, and also defines its own Directions enum. Just rename the module's FaceDirection function (to FaceDirection2 or whatever) or call AGS' native function instead.

Also don't forget that for optimal results you should now put the module's main loop in late_repeatedly_execute_always, otherwise you character's mirror reflection could be one frame late.
 

Matti

Could you update the link again?

Monsieur OUXX

Done. I would recommend doing a slight modification and use repeatedly_execute_late to make the reflection's frame always perfectly in sync with the character's frame.
 

Crimson Wizard

Quote from: Monsieur OUXX on Tue 24/12/2019 15:42:40
Done. I would recommend doing a slight modification and use repeatedly_execute_late to make the reflection's frame always perfectly in sync with the character's frame.

it's late_repeatedly_execute_always :).

SMF spam blocked by CleanTalk