-SOLVED-Can't use variables on object behavior menu.

I’m working on an upgrade system, I really need to add variables to the object behavior menu, but when I type in what I need the text gets reset to 0, is there any known work arounds to get this to work or is it just impossible?

I’m trying to modify the “TopDownMovement” behaviour to use object variables, so then I can modify those variables and get the upgrade system to work.

Thanks.

UPDATE: I baiscly did as said on the first answer.

No, property menus do not accept variables. You need to use events if you want to change any property of a behavior using a variable.
If you click add action and go to Top-down movement you will find all the events there to change any property of the behaviour / object.

However, properties are not being updated constantly either so even if you would do At the beginning of the scene property = variable, the property would be updated only once at the beginning, after if you change the value of the variable it would have no effect on the property because it is not being updated constantly unless you do constantly update the value of the property by purpose but it is not recommended.

So, whenever the player use an upgrade you should go and change the value of the property only once.
For example if you want to increase speed of player if player collided with an upgrade…

[code]Condition:
Player is in collision with Upgrade

Action:
Do = Upgrade.Variable(name) to Max.speed of Player
Do = Upgrade.Variable(name) to acceleration of Player
…etc[/code]

But do not go like

[code]Condition:
no condition

Action:
Do = Variable(name) to Max.speed of Player[/code]

Because it is going to hit performance, behevaior properties are meant to be updated only once in a while and not constantly.

Ok, thanks I’ll give this a try, the idea here is basicly to show up an upgrade menu whenever you finish a level, it’s like a transition to the next level, and the upgrade being activated or not depends on the amount of credits the player has, so it’s not going to get changed constantly, just around 3 or 4 times.