• 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.

hard trigger help me please

Status
Not open for further replies.
Level 6
Joined
Oct 29, 2010
Messages
171
alright so i need a trigger that does this, once a certain gate is destroyed 3 regions on the map start spawning 20 units every 15 secounds. The units wonder around randomly and attack all the player units/buildings and doodad gates. Then to stop the spawning a certain tower has to be destroyed. Please help me with this trigger
 
Level 7
Joined
Aug 31, 2011
Messages
125
Alright, just delete the other one.
Anyways... Here is a example would it should look like:


  • Test
    • Events
      • Destructible - Gate <gen> dies <--(Event = Destructible - Destructible Dies)
    • Conditions
    • Actions
      • Trigger - Turn on Test 2 <gen>
      • Trigger - Turn off (This trigger)
(Make Sure to uncheck Initally On in Trigger 2)
  • Test 2
    • Events
      • Time - Every 15.00 seconds of game time <--(Event = Time - Periodic Event )
    • Conditions
    • Actions
      • Set Region = (Center of Region 1 <gen>) <--(Point Variable)
      • Set Region2 = (Center of Region 2 <gen>) <--(Point Variable)
      • Set Region3 = (Center of Region 3 <gen>) <--(Point Variable)
      • Unit - Create 20 The Units you want to summon for The Owner of the Units at Region facing Default building facing degrees
      • Unit - Create 20 The Units you want to summon for The Owner of the Units at Region2 facing Default building facing degrees
      • Unit - Create 20 The Units you want to summon for The Owner of the Units at Region3 facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_Region)
      • Custom script: call RemoveLocation (udg_Region2)
      • Custom script: call RemoveLocation (udg_Region3)
  • Test 3
    • Events
      • Unit - Tower <gen> Dies <--(Specific Unit Event)
    • Conditions
    • Actions
      • Trigger - Turn off Test 2 <gen>
Use all three triggers.
Hoped i helped. ~xIceShotx
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
3 regions on the map start spawning 20 units every 15 secounds

You are aware that is 240 units per minute? Especially if they wander around randomly and are not killed quickly after being spawned they will soon overload the pathing system and the whole map will become unplayable.

You will probably need a spawn cap (if the units have small collision then 400 per spawn owner otherwise 100 odd) to prevent the pathing system falling appart and units comming to a crawl.
 
- Also map will be unbalanced, hero created for killing single unit, no mater how good improved over game, won't be able to kill so many creeps.
- I suggest no more than 5 creeps spawned at same time, just increase their stats.
- 1 more thing, creating 20 units at same time will create lag, small delay, even on really powerful PC configurations, so you will need some kind of loop to avoid this.
 
mckill i'm trying to figure out your EngageSystem but i cant figure out exactly how to use it even with the instructions is there a video tutorial for this?
you really dont need to do anything but to copy the code to your trgger editor...

this is the key...
JASS:
function SetEngageUnit takes unit u, boolean attackcaptain, real atkdur, boolean pickupitem, boolean retreat returns nothing

another sample, if you wanna create a footman...

  • Event
    • TIme Elapsed - 1.0
  • Actions
    • Unit - Create 1 foorman for Player...
    • set footman = LastCratedUnit
    • //now just fill up the required parameters...
    • Custom script: call SetEngageUnit(udg_footman, true, 10, false, true)
udg_footman = is your footman unit...the "udg_" is a prefix for global variable "footman", that you must declare in jass codes
true = the AI will protect an ally hero or not
10 = the duration on how long the AI will lock a particular point/target
false = footman cannot pick up item
true = footman retreats when low on HP

and your AI will go with the flow, but Im updating it to version 2.7 with more options and fixes...
 
Level 6
Joined
Oct 29, 2010
Messages
171
lol im still confused what do i do with the key

i did what you said and i tryed to test the map and it said it wasnt work for the custom script for the unit i was spawning said 1 decompile error, then like 14 decompiled errors or something for the heros skills thing and then 345 decompiled errors for the engage system. HELP
 
Last edited by a moderator:
Anyway, did you checked my map at first place, system is simple, I know but it work, leaks are minimized (you can remove them all when you finish with spawning) and easily editable.

We really need to see your map, send it to me if you don't want to upload it here.
And please don't worry and care about map stealing NO ONE WILL STEAL YOUR MAP! OK?
 
Status
Not open for further replies.
Top