• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Control Points and Tug of War

Status
Not open for further replies.
Level 2
Joined
Feb 22, 2008
Messages
15
Hello once again, I am attempting to add two unique functions into my map and do not know what the trigger formula should be for these.

The first system I need to add is Control Points. I have Seven siezable locations on my map that I wish to have Heroes fight there way to, stand next to them for 30 seconds to Cap them, and as long as these CPs are under their control give them bonuses. I want each CP to give a different bonus Globally to their team.

The second system I wish to implement is a Tug of War style. I desire a cart that starts in middle of the map and players attempt to fight there way into control of it and bring it back to their base for a temporary boost (IE Five minutes.)

I have no clue where to start for either of theses systems and would appreciate all help, Thanks!
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
1) Create regions where the heroes should stand in in order to be in range to capture a Controle Point. Then set an Integer variable called Timer[1] (where the index is for the Control Point number) and set Timer[#] = Timer[#] + 1 every 1.00 seconds (The last is an event). If a hero of another player enters, turn off the trigger that adds +1/second to the timer. If Timer[#] reaches 30, set it back to 0 and execute the actions to take control of the Control Point for the playing that captured it.

2) Make it a droppable item. You can either choose to make the hero sell it to their own base or make a region and when they enter it with the item in their inventory, they get the boost of your choice.
 
Level 2
Joined
Feb 22, 2008
Messages
15
Thank you I will try your first half of the reply for the controlpoints, but my friend insists that on the tug of war trigger that it is a unit that moves when units are near it.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
That's just like prisoned Illidan in the Blizzard campaign. In that case, you need to make a trigger with event 'Unit Comes within x range of Unit' and 'A unit dies'. When a unit comes in range of the unit you want to move, check if there are other units in range of the moving unit. If not, make the unit move towards the base of the owner of the unit who came in range. When a unit comes in range and a unit of another player is nearby, order the moving unit to stop. When a unit dies, check how many units there are owned by different players. If there are only units owned by 1 player, order the moving unit to move to his base. If there are units of different players still in range, don't do anything, since the moving unit is already stopped due to the first trigger.

If you don't know exactly, extract the Night elf campaign from the MPQ file and check the triggers of that map. I don't know the map name, since I haven't played the campaign in ages xD Just take a look around. It's a map with 2 bases and Illidan caged in the center.
 
Level 2
Joined
Feb 22, 2008
Messages
15
Im having trouble setting up the trigger portion as I cannot seem to find the required items, I see what you are saying on the timers in trigger one, Could you go into editor make out the trigger and post it here so I have the general Idea patted out as to where I am suppose to find these things?

Also, On the 2nd trigger, I found the map you were describing to me but it was too confusing so I was forced to wing it based on what you've said and I have manged to build the trigger with the exception of stopping the cart if another player is near it, This part seems to stump me.
 
Last edited:
Status
Not open for further replies.
Top