HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawning trigger help

07-12-2002, 02:15 AM#1
Guest
im trying to make a madness sort of game, like zelda madness. I have the part where the select a unit and it goes to the designated location, but i cant get it to keep spawning the unit that i chose. Please help
07-12-2002, 02:17 AM#2
Guest
I'll help, just tell us what you've done currently. But have you used variables to detect which unit the player has selected? Because unless the event is continuous, it only happens once. (Like for "Unit enters region", it only activates the action when they enter the region, not currently residing in the region.)
07-12-2002, 02:21 AM#3
Guest
oo i get it, this is what iv done

trigger (select footman)

event
unit-A unit enters footman <gen>
Coniditions
(unit-type of (triggering unit))equal to whisp
actions
creat 1 footman for owner of triggering unit at owner of triggering unit start location
07-12-2002, 02:22 AM#4
Guest
how do i get it to keep spawning the footman after that?
07-12-2002, 02:22 AM#5
Guest
That's your problem then, just make it so a variable is activated when someone enters the region, and is deactivated when it leaves. And of course, make another trigger so as long as the variable is activated, then make the units.
07-12-2002, 02:24 AM#6
Guest
uh how do i do that?
07-12-2002, 02:35 AM#7
Guest
  • Triggers - Triggers
  • Whatever - Category
  • Enable Footman Spawn - Trigger 1
    Events
    Unit - A unit enters Footman <gen>
    Conditions
    (Owner of (Triggering unit)) equal to Player 1 (Red)
    Actions
    Set Footman[1] = 1.00
  • Disable Footman Spawn - Trigger 2
    Events
    Unit - A unit exits Footman <gen>
    Conditions
    (Owner of (Triggering unit)) equal to Player 1 (Red)
    Actions
    Set Footman[1] = 0.00
  • Footman Spawn - Trigger 3
    Events
    Time - Every 5.00 seconds of game time
    Conditions
    Footman[1] equal to 1.00
    Actions
    (Create 1 footman for (Player 1 (Red))) at owner of (Player 1 (Red)) start location

You of course make a "Real" variable by clicking the "Edit variables" button when you need to create "Footman[1]". There may be an easier way to do this, but I don't know of anything, so you need to create an array, and add the number of the player for every player involved. Arrays are just ways of categorizing single variables, kinda like putting a lot in one.

Hopefully someone here will tell you an easier way, because if you use this way, then you have to create these three triggers for every player, and things get a little messy.

Hope that made sense.
07-12-2002, 02:46 AM#8
Guest
If you are using Unit enters region as an event, it should only activate once when the unit enters that region.

If you're saying that it is making a unit everytime a wisp enters the region, and you only want it to happen once, use Trigger - Turn this trigger off

If you are saying that it happens over and over again with the unit sitting in the middle of the region, then there is a problem.

if the region is only 1 square, maybe try making it bigger. Also possibly try switching Triggering Unit to Entering Unit.
07-12-2002, 03:06 AM#9
Guest
thanks man i owe ya