| 02-11-2004, 12:46 AM | #1 |
Every thirty seconds I want one unit to be destroyed and a random one created in the same spot. I have no idea how to trigger this. Any ideas from anyone? |
| 02-11-2004, 01:17 AM | #2 |
All you need to do is set an unit-type array with the differnt units that can be created. (unittype is a unit-type array) Actions Set unittype[0] = Peasant Set unittype[1] = Footman Set unittype[2] = Knight Set unittype[3] = Rifleman Set unittype[4] = Mortar Team Set unittype[5] = Flying Machine Set unittype[6] = Gryphon Rider Set unittype[7] = Priest then every 30 seconds run this action Actions Unit - Replace (Whatever unit) with a unittype[(Random integer number between 0 and 7)] using The old unit's relative life and mana |
| 02-11-2004, 02:04 AM | #3 |
I can't figure out how to start an array. Searching for Set unittype brings up nothing. And what do I put as the events for the array trigger? |
| 02-11-2004, 02:17 AM | #4 |
An array is basically a variable that you can make but holds more info, to create an array while making a variable is check the box named variable under variable type ("Ctrl + b" while in the trigger editor to bring up variables). unittype was just the name that i gave to the unit-type array, you can set them using set variable action. The events for the array trigger can be anything, but map initialization or a couple seconds into the game works best. hope that helps. |
| 02-11-2004, 10:45 PM | #5 |
Ugg, I still don't get it. Can anyone just give me a quick step-by-step of what to push. I thought I was finally getting the hang of triggers. |
| 02-11-2004, 11:55 PM | #6 |
I cant give step by step becuase i didnt know what your not understanding, but i can do the next best thing. The attached map i did what i told you, only differnce is i added another variable which is what unit you want to change. I didnt know weather you wanted to replace a specific unit of a random one, so i did specific. |
| 02-12-2004, 12:40 AM | #7 |
Oh, that's even better. Thanks for all your help, dude.:D |
