GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

variable comparison in rule setup...

harrioharrio Posts: 234Member
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

Comments

  • CodeMonkeyCodeMonkey Posts: 1,803Head Chef, Member, PRO
    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 Posts: 234Member
    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 Posts: 234Member
    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...
This discussion has been closed.