Dependant variables?

Question, can I have a variable (I.E carry weight) dependant on another (I.E Strength)?


Yes. The usual way to do this would be to give the object a script attribute named changedstrength. This will be run whenever the strength attribute changes, so you can use it to calculate the new value of the weight attribute.

Note that the name of the script must be changed followed by the exact name of the base variable (Strength in your example). These names are case sensitive. Within that script, if you wish, you can use the variable oldvalue to find out what it was before the change.


thank you!


In Quest, the box where you add attributes, above it there are a +,-, and a plus sign with a box around it. select an attribute and then select the plus with a box around it. This will automatically bring up a pop-up asking for the script for a changed(whatever) attribute. That is what it does.


Log in to post a reply.

Support

Forums