HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Specific Unit event into a Generic Unit Event?

03-05-2004, 01:45 AM#1
Pesmerga
How would I go upon making my "Specific Unit Event - Notices a target in range" event into a "Generic Unit Event - Notices a target in range" ?? Ideas would be helpful.
03-05-2004, 05:07 AM#2
dataangel
You can and you can't. I'm guessing the reason you want this is because you want the event to work for a unit that you haven't preplaced (as specific unit events only work with preplaced units). The trick to this is to put the unit in a variable, then use the Trigger - Add Event action. You can pick the specific unit event, and you will now be able to select the variable.
03-06-2004, 01:22 AM#3
Pesmerga
Ahh thank you very much!
03-06-2004, 01:58 AM#4
AnarkiNet
ah, thank you, data, i needed that answer too :)
03-07-2004, 06:34 AM#5
Pesmerga
Ok new problem.

I have a guard at a gate (belonging to computer) and is just on watch. When something comes in range of him, I want him to basically open the door and run. How would I detect that unit? Both units are not pre-placed.
03-07-2004, 01:03 PM#6
linkmaster23
Set the guard to a variable sometime in the game, along with the dude that runs up to him. Then detect when they come in range of each other.
03-07-2004, 03:25 PM#7
Pesmerga
I can't just predict which units come in contact with each other. I need a trigger that will fire when any unit (offensive) comes in range with another any unit (defensive)
03-16-2004, 10:07 PM#8
volvo64
Just use regions. Place a region around your guard and then use Event - unit enters region to trigger your guard unit to open the gate and run like hell.
03-17-2004, 02:23 AM#9
zotax
Whoah thats an interesting function, very usefull