| 01-03-2003, 10:39 PM | #1 |
ok i have a trigger that when a unit enters one of 11 regions it fires up andwhat i want to do is to is to be able to use the convert string to integer and the string shuld be the region name (which is 0-10) i want to do this so i can use the number for the index of an array is it possible emote_confused because if it isnt i have to make 11 different triggers :bgrun: |
| 01-04-2003, 01:30 AM | #2 |
Couldn't you just use a region array? You don't need any string conversions methinks. Just have a few actions like: Set Variable: Set 11Regions[1] = The first region Set Variable: Set 11Regions[2] = The second region etc. Obviously '11Regions[x]' is your region array. Then just use 'For each integer A' to do your actions. |
| 01-04-2003, 04:28 AM | #3 |
nope i have to use them all in events and the number ineed to get is for a boolean array |
| 01-04-2003, 05:44 AM | #4 |
You need to post more details as to what you're trying to do. If you're trying to make the region's name "1" and then convert the 1 to a string then put that in the array.. nope, there's no region name to string converter :P What you'll need is a region array, put each region in the array, then test if the region just entered is whichever one in the array, then once it finds it, put that number in to the boolean array. I can spell that out better if you need it. |
| 01-04-2003, 02:48 PM | #5 |
na its ok il guess ill just make 11 triggers |
| 01-04-2003, 07:02 PM | #6 | |
Quote:
Are you sure you can do that? Technicly, the regions we all know and love (and draw) are rerally RECTs. The regions that fire on unit enters region events are really "cell based, possibly disjoint regions" with our rects inside them. AFAIK, theres no way to check if the specified rect is really in a region. Please correct me if I'm wrong, I'd find this system useful as well, but I had given up on it due to the problem I justa mentioned ;) |
