Page 1 of 1

Creating Variables

PostPosted: Fri Nov 28, 2008 6:33 pm
by smillz
Is there a way to create a varialble with the same properties as the more complex ones? (I need another variable to act as directional velocity and angle does)

Re: Creating Variables

PostPosted: Fri Nov 28, 2008 6:51 pm
by DarkParadox
use a float. float works like int, but, goes into decimals allowing whatever, and you could use int, but use a float anyways

Re: Creating Variables

PostPosted: Fri Nov 28, 2008 7:20 pm
by smillz
what's a float?

Re: Creating Variables

PostPosted: Fri Nov 28, 2008 7:24 pm
by DarkParadox
a "real variable"
basicly, an int that supports decimals



if you need anymore help, contact me in MSN
diormeh@live.com

Re: Creating Variables

PostPosted: Sat Nov 29, 2008 1:53 am
by Fuzzy
float means floating point, ie: the decimal point can move to represent many ranges of numbers. An int, or integer can only be a whole number, plus positive or negative.

Re: Creating Variables

PostPosted: Sat Nov 29, 2008 9:54 pm
by smillz
ok, so I know what a float is now (I knew what it was before, but I just referred to it as a real var), But does anybody know how to make a variable that acts like directional velocity? What I mean by that is I need a variable, I'll call it directional_velocity2, that reacts to "angle2"(created variable) instead of "angle"(variable already there) by making the players velocity go in the direction of "angle2"...... if that makes sense :?

Re: Creating Variables

PostPosted: Sat Nov 29, 2008 11:44 pm
by Killagram
I believe that is what 'vectoradd' is for, but its kinda difficult to use.

Re: Creating Variables

PostPosted: Sun Nov 30, 2008 12:55 am
by smillz
Killagram wrote:I believe that is what 'vectoradd' is for, but its kinda difficult to use.


well, I guess I'll try vectoradd.... anyone knows how to use it?

Re: Creating Variables

PostPosted: Sun Nov 30, 2008 7:32 pm
by smillz
Never mind, I learned how to use vectoradd and it works like a charm :D
there is an example on how to use it here http://game-editor.com/examples/vectoradd.zip