Today I was looking at a gas chamber map and the person used $targetname/some value i forget
and then on the same entity they had
targetname/same value as the $targetname
What is the "$targetname" for because I use just plain old "targetname"?
$targetname command in radiant
Moderator: Moderators
$
Far as I know, the "$targetname" value will stay the same if the entity is cloned. If you use just "targetname" the value will change to "t1", "t2", "t3", etc... when cloned.
Some scripts work better if in radiant you use $targetname and the # symbol for a number eg. key: #bla value: 1 this is called type casting where the $ is for strings and the # is for numbers . You can't really do that with scripting though but in script you would put "" around strings . Also as tom said the $ charactor is recognized by radiant as having special meaning .
Are you sure it is not the other way around JV $targetname instead of targetname ? Not sure if it makes that much difference really but I think it has in some scripts .jv_map wrote:Always use 'targetname'. Otherwise targetname arrays won't work correctly in the script (that is if you have more than one entity with the same targetname).
another question
Okay with that cleared up what does this mean?
(Found in the same script as before)
Where do people come up with these strange level variables because I have no clue what they mean. There isn't the slightest hint in the .map file or the script.
I am just wondering how people come up with their own level variables?
I need some major help with level variables.
Code: Select all
level.sealed = 0
level.bdseal = 1
level.dimlights = 0
I am just wondering how people come up with their own level variables?
I need some major help with level variables.
Re: another question
That's all in (and out of) their mind.erick wrote:Where do people come up with these strange level variables because I have no clue what they mean. There isn't the slightest hint in the .map file or the script.
I am just wondering how people come up with their own level variables?
I need some major help with level variables.
Most variables they and you will use aren't system variables but just invented to store and use information for later use.
"level" means that this variable will be available and valid for all threads in ur script, whereas "local" would be only for the thread it's in. Another local.somevariable in another thread would be a seperate variable.


