View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:01 pm



Reply to topic  [ 5 posts ] 
 Not defining a variable 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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
Profile

Joined: Fri Feb 25, 2011 3:52 pm
Posts: 39
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.095s | 16 Queries | GZIP : Off ]