variable comparison in rule setup...

harrioharrio Member Posts: 234
edited November -1 in Working with GS (Mac)
what's cookin,

i wanted to create some constant variables. reason being, i use math rules to define my left and right borders. and every movement makes some kind of comparison to them in their respective rule setups. so when i tweak where i want the borders to be for the enemies and the player, i don't want to have to physically change every instance of a rule.

as it is now, i would have to change all rules similar to this;

attribute change: (self.position x) [equals] (445)

but i should be able to do this;

attribute change: (self.position x) [equals] (game.right border)

this way i only change the game constant variable to affect all rules instances.

hope this makes sense...toodles


  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    I'm confused on this? was this to help everyone else, or a request?

    What you speak of can be done. If you are looking for the expression editor button so you can add functions or reference a variable, you may need to widen the window a little. Its sometimes hidden behind some of the other buttons.
  • harrioharrio Member Posts: 234
    what's cookin,

    i guess it was both. but if you can already do it, then that just makes me a bone head. i'll look again. i must have missed something.
  • harrioharrio Member Posts: 234
    what's cookin,

    c'monkey has confirmed it...i'm a bonehead. the 'e' button was covered by the '-/+' buttons. but that's another reason that i requested that if the ui windows can be adjusted, that they remember the last adjustment. i had the screen full blast on a mbp 17" and the button was still covered. i had to crunch down the actor properties window on the right just to see it.

    but of course, that in no way excuses my bone-headedness.

    thx for the help...
Sign In or Register to comment.