PDA

View Full Version : unrealscript language question


kentyman
16th Dec 2004, 08:33 AM
I'm working on a bunch of scripts and I need to set a bunch of object.Tag properties at runtime. Basically I have a string part and a numerical part which need to be combined into a single name tag...

How do I do this?

For example the string part & number are:

local name Blah;
local int i;

Blah = 'ANiceTagName';
i = 31;
self.Tag = Blah $ name(i); // doesn't work, but what does?

The end result should be:

self.Tag = 'ANiceTagName31';

but I don't know how to do this... need help!

[SAS]Solid Snake
16th Dec 2004, 09:01 AM
Names cannot be altered at runtime.

kentyman
16th Dec 2004, 09:09 AM
Solid Snake']Names cannot be altered at runtime.

Actually I was trying to change the 'tag' at runtime (which is a 'name' property). I just figured it out, all you have to do is:

int i = 20;
self.SetPropertyText("Tag","BlahStringName"$i);

this will set self.Tag to

'BlahStringName20'