Expressions

azimpactazimpact Member Posts: 112
In looking at some of the tutorials, I see the use of expressions like the following:
"self.Initial Y+ self.Rise Height"

Where is the use of expressions like this documented?

Comments

  • KamazarKamazar Member Posts: 287
    I'd have to see it in context. Those are custom variables.
  • azimpactazimpact Member Posts: 112
    It's in one of the platform templates.

    If it's a custom variable, where did they learn what to use for the programing to make it work. I can not find nothing describing the functions or expressions which after reading many of the posts here, is what is needed to make a great game.

    I love the user interface drag and drop and have no problem learning the scripting if I have a reference to learn from.

    Where did all the expert game makers on here like tshirtbooth learn how to do what is they do?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi azimpact: game maker experts, like tshirtbooth and many others, learnt to do what they do just like getting to be an expert at anything; practice! (I hasten to add at this point that I'm not included as one of the game making experts; I just started using GS not long ago). Although I can understand your frustration if you can't find any reference to help, if you have a problem.

    I guess you've gone through all (yes, all! Well, OK, some... ;-) of the Support material, which includes YouTube videos by tshirtbooth and others? By running through these, it'll all start to click with you.

    http://gamesalad.com/wiki/

    Don't worry about functions in the expression editor for now. you've learned about custom attributes, which includes variables: all the expression editor does is apply simple (or later, not so simple) maths (or math, if you live in the US).

    In your example, for instance, in the expression editor: self.Initial Y+ self.Rise Height,
    is simply adding two numbers together. The attribute named Initial Y might have a value of, say 250, and Rise Height might be, for instance, 57. So this expression could be telling GS, in the Rules, that another attribute, Jump Limit, for example's sake, is to be self.Initial Y+ self.Rise Height; which will be 307.

    Basically, once you've learnt this principle of using the expression editor, a lot will fall into place at once.

    Good luck!

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.