|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Not defining a variable
I've never been sure of this, so, what happens when I don't define a variable like GibWoundLimit?
As far as I know, you can create actors (or AEmitter or MOSRotating) without defining that variable, without defining GibImpulseLimit or LifeTime.
Does that make that variable set to infinite or something?
|
Tue May 01, 2012 6:05 am |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: Not defining a variable
From my experiences, I do believe infinite is default if you don't define a variable.
Unless it's something where the number sets a status to something, like HitsMOs or DrawAfterParent then it would either give an error or automatically set it to a default number depending on what the variable is.
EDIT: Jesus Site lag.
Last edited by Coops on Tue May 01, 2012 3:36 pm, edited 1 time in total.
|
Tue May 01, 2012 3:10 pm |
|
|
zoidberg
Joined: Fri Feb 25, 2011 3:52 pm Posts: 39
|
Re: Not defining a variable
may be slightly off-topic, but this Code: //begin AddEffect = MOSRotating PresetName = derp SpriteFile = ContentFile FilePath = Base.rte/Null.bmp AtomGroup = AtomGroup CopyOf = Null DeepCheck = 0 //end
do works. ("Null" is a seperately defined atomgroup)
|
Tue May 01, 2012 7:58 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Not defining a variable
It seems it is set to infinite. Anyway, it's better not defining the variable that spamming 9s.
|
Wed May 02, 2012 5:20 am |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: Not defining a variable
I like to leave the variable there, but commented out, when I want a default value. That way it's slightly more intuitive to change it from default to another value later when adjusting something, or copying the object when making something similar later.
Not all variables are infinite by default, though. Sharpness, AirResistance, GlobalAccScalar, and plenty others that don't come to mind at the moment have 0 or 1 as default.
And sometimes infinite is treated numerically as -1, for variables where negative values would make no sense. So if infinite isn't default, or you just feel like inputting it, that might be worth considering.
|
Fri May 04, 2012 4:29 pm |
|
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: Google [Bot] |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|