Expressions in Attribute Browsers
ADSentertainment
Member Posts: 397
I'm trying to make a rule so that if an attribute modulated by 2 is equal to zero (if it's an even number) then have it do something, but I can't add expressions when putting in my attribute using the attribute browser, I've tried clicking on the text box, and I can't seem to edit it at all other than add an attribute or remove it. Is there any way I can do this? The equation I'm trying to do (in code) is "If Game.Wave Number % 2 = 0 then do whatever."
Having trouble with your game? Sounds like a personal problem.
Comments
1. create a self.attribute and give it a value of 0, then you can have a rule that says "if self.Attribute = game.Wave Number % 2 then do whatever.
2. seperate the modulation out into another function(this is what I do), and have two rules that say if game.WaveNumber = 0, do this, if game.WaveNumber = 1, do that.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Having trouble with your game? Sounds like a personal problem.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User