HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Another Trigger

01-08-2003, 11:27 PM#1
Roderick
Ahoy! I was just passing by, but then decided to post a trigger that has been helping me for a lot of time so here it goes

Create an array Unit variable called "Hero" and a unit group var. called "Heroes"
Event:
- A unit enters <Choose_character> (it's a region, duh)

Actions:
- Remove (Entering Unit) from the game
- Create a <Character> for (Owner of entering unit) at <Region> facing... bla bla bla
- Set (Hero[(Player Number of (Owner of (Entering Unit)))]) to (last created unit)
- Add (Last created unit) to (Los Heroes)
... And whatever you want to do when choosing a character

So, this is the way I keep all heroes in a group, so I can refer to all of them (for making comparissons for example, or cheking if the triggering unit is a hero) and still can reffer to each one of them.

If you get somehow lost with this :abomHuh?:... ask someone else
:abomHUH?:
01-26-2003, 12:57 AM#2
DemonicSoul
i would suggest instead using
unit is attacked, kill attacker, create a unit of type of attacked unit

needs no regions, and personally i like it better because u cant walk onto the wrong pad accidentally or anything
01-26-2003, 02:28 PM#3
Azumarril
plus the attacking way is easier!
02-05-2003, 08:18 PM#4
Milkman
Thats not th epoint, the point was the variables, he just used the other stuff as an example