Speed as an attribute. Possible BUG?
MattButlerStudios
Member Posts: 486
I had this happen to me multiple times while creating two games for one of my clients. Whenever I use a change velocity rule and set the speed as a global attribute, the rule does not fully fire, causing the actor not to change velocity at all. Instead, if I put in an integer amount other than the attribute, it works just fine. Has anyone else had this issue, or have a potential fix? The only fix that I have found is to declare rules for each and every speed that the global attribute may encounter. (Defeats the purpose).
Comments
Yep, I can verify that the Change Velocity behavior only changes the value once. This would be similar to a Change Attribute behavior. It doesn't continually change the value. For that, you'd need to use Change Velocity within a Timer.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang thank you for your response. So you are saying that this is how it is designed to work?
www.mbstudios.co | Free Stuff
Its not a bug. Its how GameSalad is supposed to work!
The thing to remember is that Change Velocity is not a behavior. It is an 'action' and is meant to only fire once. (Just like Change Attribute is not a behavior, but is an action.)
The easiest way to make the Change Velocity action act like a 'Constrain Velocity' behavior would be to use it inside a 'Timer' behavior container. (And set the time interval to zero.) Edit: As @tatiang suggests above.
Yes, I understand that. I just wanted to get some clarification. Thanks guys! @tatiang @RThurman
www.mbstudios.co | Free Stuff
Yes -- sorry if that came across too strongly. Lately, I've been trying to teach the difference between GameSalad "behaviors", "actions", and "groups". And I guess your post caught me while I'm still in lecture mode.
Well and I should probably choose my words more carefully since I tend to call anything not a Rule a Behavior. =P
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@RThurman @tatiang it's no problem, thanks again for your help! This may seem like a silly question, but ever since the GS design update I have not been able to get to my profile page without going to the direct url. Do you guys know where that button is located on the forum page?
www.mbstudios.co | Free Stuff