ID:153707
 
Not sure how to code this, but what I need to happen is while the program is in a certain state, say "if(A == 1)"
Then I want a proc to rename all the items listed in usr.contents to name = "".

When the state goes back to A = 0 then it will reassign the objs their formal name.

Also if you null name will the item default to it's defined name??

LJR
LordJR wrote:
Not sure how to code this, but what I need to happen is while the program is in a certain state, say "if(A == 1)"

If this is a yes/no kind of check, then don't do if(A==1). Do if(A). Putting in ==1 is sloppy programming because it is not robust.

Then I want a proc to rename all the items listed in usr.contents to name = "".

No put usr in procs. Ungh.

When the state goes back to A = 0 then it will reassign the objs their formal name.

Then you'll probably need some way of keeping track of the formal name, or some way of building it. You might need another var for this. initial(name) will probably work for most things but I would suspect not all--it depends on how "dynamic" names can get in your game.

Also if you null name will the item default to it's defined name??

No.

Lummox JR
To set any variable back to its defined default, use variable = initial(variable)