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

Status
Not open for further replies.
Level 3
Joined
Jun 1, 2005
Messages
42
i'm having trouble getting my 2nd wave to work. this is what i've done but its still not working can anyone help me?





Variable:

Variable Name: WAVETYPE
Variable Type: Unit-Type

Variable Name: WNO
Variable Type: Integer

Triggers:



Trigger Name: WN

Action: If (WNO equal to 1) then do (set WAVETYPE = Footman) else do (do nothing)
Action: If (WNO equal to 2) then do (set WAVETYPE = Grunt) else do (do nothing)
Action: If (WNO equal to 3) then do (set WAVETYPE = Ghoul) else do (do nothing)



Trigger Name: Initial Wave

Event: Time - countdowntimer expires
Action: Set WNO = (WNO +1)
Action: Trigger - Run WN <gen> (ignore conditions)
Action: If Player 1 slot status equal to playing then do (unit - create 10 WAVETYPE for player 12 at Starting Region) else do nothing
Action: Trigger - Turn off (This trigger)
Action: Trigger - Run Continous Timer <ge> (checking conditions)



Trigger Name: Continous Timer (this trigger is initial off)

Event: Time - Every 1.00 secounds of game time
Conditions: Number of Living WAVETYPE owned by Player 12 Less than or equal to 0
Action: Trigger - Turn off (This trigger)
Action: Trigger - Run Continous Wave <gen> (ignoring conditions)



Trigger Name: Continous Wave

Action: Set WNO = (WNO +1)
Action: Trigger - Run WN <gen> (ignore conditions)
Action: If Player 1 slot status equal to playing then do (unit - create 10 WAVETYPE for player 12 at Starting Region) else do nothing
Action: Trigger - Turn off (This trigger)
Action: Trigger - Run Continous Timer <ge> (checking conditions)
 
Level 3
Joined
Jun 1, 2005
Messages
42
do you just remove the trigger in Continous timer's action for turning itself off?
 
Level 3
Joined
Jun 1, 2005
Messages
42
Ok. thanks for your help, i've got that problem solved.

i've got another question now. i'm trying to make my towers to cast abilities like chain lightning and shockwave when they attack enemy units using triggers.

i don't know the event trigger i need, any ideas???
 
Level 3
Joined
Jun 1, 2005
Messages
42
Oops, i meant Action, not event, sry :p

  • Shockwave
  • Events
    • Unit - A unit owned by player 12 (Brown) is attacked
  • Conditions
    • (Unit-type of (Attacking unit)) Equal to Shockwave Tower
  • Actions
    • ???????
 
Last edited:
Level 12
Joined
Aug 18, 2006
Messages
1,193
well, there is a action for automaticly ordering a certain unit, so here is what i would do for the chain lightning

  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of (Attacking unit)) Equal to Chain Lightning Tower
  • Acions
    • Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)
hope it helps :p
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
I would like to note that the Unit is Attacked event will fire every time a player orders your tower to attack a unit. If you don't understand what I say make a sandbox map with this trigger and try it out with a unit.
I would suggest you that to set a casting time of chain lightning equal to your tower's attack speed.

Edit: forgot to note:
Please open another thread for each question you have if they are not related to each other or if they are not coming from your first question. I think it's in the rules but it creates shorter threads and shorter threads are easier to reply to.
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
first of all you have to make an ability based on orb of lightning, and set the chance of ability being cast to 100% then make your chainlightning and add it to the orb ability, then give the orbability to the tower, then make 2 triggers
  • trigger1
  • Events
    • Unit - a Unit finishes construction
  • Conditions
    • triggering Unit equal to your tower
  • Actions
    • Trigger - add event (triggering Unit) targets a Unit to Trigger2
  • Trigger2
  • Events
  • Conditions
  • Actions
    • Unit - order Triggering Unit to attack targeted Unit
Edit: this also prevents the player from using the ability by himself, so its only activated when the tower shoots
 
Level 3
Joined
Jun 1, 2005
Messages
42
ok. thanks to your help, i have manage to get about 70% of the towers auto-casting ability to work. i still have one more problem. i can't use this method for techniques like shockwave, or carrion swarm. what do i use instead of 'Targetting a unit'?

i've tried using Targetting a point, but i can't exactly specify a EXACT point, since it should be in the direction of the attacked unit, but i can't seem to get that to work.

Edit: ok, emperor_d3st. this will be final one, nd if i ask another question then i'll start a new thread, sry about this.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
  • Spell
  • Actions
    • Set TempPos = (Position of (Attacked unit))
    • Unit - Order (Attacking unit) to Orc Tauren Chieftain - Shockwave at TempPos
    • Custom script: call RemoveLocation(udg_TempPos)
i set the position and later destroy it becouse else it will create a leak. I will edit this post with a link to the thread about it

EDIT : Read more about leaks here http://www.hiveworkshop.com/forums/showthread.php?t=35124
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Oh, my bad. I didn't know orb of lightning was capable of that.

UreD4aD, I don't understand why would you need those two triggers if adding a custom orb of lightning ability does all the dirty work?

Edit: I didn't test UreD4aD's way but I see no problem why shouldn't it work and if it works (it most probably does) then it's way much better than the method Razorbrain and I suggested.
 
Level 3
Joined
Jun 1, 2005
Messages
42
first of all you have to make an ability based on orb of lightning, and set the chance of ability being cast to 100% then make your chainlightning and add it to the orb ability, then give the orbability to the tower, then make 2 triggers
  • trigger1
  • Events
    • Unit - a Unit finishes construction
  • Conditions
    • triggering Unit equal to your tower
  • Actions
    • Trigger - add event (triggering Unit) targets a Unit to Trigger2
  • Trigger2
  • Events
  • Conditions
  • Actions
    • Unit - order Triggering Unit to attack targeted Unit
Edit: this also prevents the player from using the ability by himself, so its only activated when the tower shoots


i don't know how to make Trigger1's Event. could you give me step by step on it?
 
Level 3
Joined
Jun 1, 2005
Messages
42
Oops i did it again. I meant Action, but i wrote Event. sry, could you tell me the Action, not the Event sry about that.
 
Level 3
Joined
Jun 1, 2005
Messages
42
new Action -> trigger ->
  • Trigger - Add to (trigger2) the event (Unit - (Triggering unit) targets a Unit)
its the last trigger action


for the Unit part, its Specific Unit event right? becos i can't find targets a unit.
 
Status
Not open for further replies.
Top