|
Post by ZdChip on Dec 22, 2006 18:39:50 GMT -5
Variables are holding containers for numbers or letters that change constantly. Most game generally use at least if more so it's important to learn them.
Global Variables Variables beginning with "global." are variables created by that object but can easily be edited by other objects. (Usage: So any object can edit it and any object can use it for checks.)
Local Variables Variables like"jumpheight" are local values. These generally aren't accessible by other copied objects, or anything at all. (Usage: To allow each invidiual object to have health and not be affected by others.)
Math and Variables
Difference between relative and absolute. Relative changes are ones that change from that number. Like 8-5=3 Absolute changes are ones than change from 0. Like 0-5=-5.
Adding Variables finalanswer+=changevalue finalanswer is the variable you want to change. changevalue is the value to change it with
Subtracting Variables finalanswer-=changevalue finalanswer is the variable you want to change. changevalue is the value to change it with
Multipling Variables finalanswer*=changevalue finalanswer is the variable you want to change. changevalue is the value to change it with
Dividing Variables finalanswer/=changevalue finalanswer is the variable you want to change. changevalue is the value to change it with
|
|