Could someone explain...

rebumprebump Member Posts: 1,058
edited November -1 in Working with GS (Mac)
...what is permitting the alien side-to-side movement in this demo project from CodeMonkey:

http://gamesalad.com/game/play/7093

I see how the right and left walls indicate a reversal and a drop of the aliens in the Y directions but from the aliens' behaviors, I only see a "move to" that looks like it would only move the aliens to the left. Either I am not looking carefully throughout the entire project or I do not understand the nuances of the seemingly simple "move to" behavior (or that project is corrupt and not all the behaviors are visible!?). When I remove the "move to" though, the side-to-side and drop movement does stop. Hmm, maybe I don't understand the differences of "relative to scene" and "relative to actor" (coordinates?).

Am I being dense?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    If you download the project, take a look at the Alien1 actor. Expand the 'Rule:Movement Control'. You can see in there, a Move To for moving down, but also look in the 'Otherwise' part of the rule and you will see the left right movement. It is controlled by the game.MoveDirection attibute. That attribute is changed by the LeftWall and RightWall actors, changing them to 0,1,and -1 depending on which is hit by an alien.

    Relative to scene means if you were to give coordinates of (100,120), it will go to that absolute position.

    Relative to actor means if you were to give coordinates of (100,200), it will go to that position as an actor would see it, taking into account its rotation as well.
  • rebumprebump Member Posts: 1,058
    OMG...how embarrassing! I never clicked on the "Otherwise" section. Egads. I guess with the hours of looking at various projects as well as a few of my own test projects, I just assumed they defaulted to being shown or something.

    Thanks for pointing out the obvious to my dense and overworked skull. I thought it was some "magic" going on that I didn't grasp.

    Feel free to delete the comments from the demo project's web page if you like (or can)...

    Thanks again!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    the otherwise section is sneaky like that. Hopefully something will be done in a future release to make the otherwise less sneaky. I have waisted many hours doing the same thing!
  • rebumprebump Member Posts: 1,058
    Thank gawd I'm not the only one! :-) I guess I made the bad assumption that if there was something in that section it defaulted to being expanded. Probably hasn't helped that I have "lived" on this web site the last three days.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    it'd be nice if the otherwise section change a color to be darker or something when there was stuff in it.
Sign In or Register to comment.