Subject: get point by name Sun Apr 25, 2010 6:31 pm
I'm wondering if anyone's found a way to get a point by name in a trigger using a string. So I could have a variable named spawnpt, and it'd be a string w/ value "spawn_1", is there any way to use that to get the point named "spawn_1"?
~cdkid
Pat1487 Moderator
Subject: Re: get point by name Sun Apr 25, 2010 6:33 pm
You can use the point editor to make a point, then use a point variable and set it to that point Then use that variable for the point
I dont think you can get the name of it as a string though What do you need it as a string for?
cdkid Recruit
Subject: Re: get point by name Sun Apr 25, 2010 6:35 pm
That's what I'm doing now, but what I'm looking to find is a way to loop through, let's say 1-10 and set an array[i] to that point based on it being named spawn_i using concatenate("spawn_", convert int to string(i))
~cdkid
Pat1487 Moderator
Subject: Re: get point by name Sun Apr 25, 2010 6:38 pm
Oh no You can make an array of points and loop through those But you cant use strings to loop like that
cdkid Recruit
Subject: Re: get point by name Sun Apr 25, 2010 6:42 pm