unrealscript language question

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

kentyman

New Member
Dec 16, 2004
4
0
0
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!
 

kentyman

New Member
Dec 16, 2004
4
0
0
[SAS]Solid Snake said:
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'​