• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with this Trigger

Status
Not open for further replies.
Level 1
Joined
Feb 6, 2010
Messages
3
Im creating a Campaign Map . . . And I need help with one trigger . . . .

:fp:Here it is:
When a unit(for example Arthas) is attacked he will say some taunts or sounds . . . and also when he is being attacked he is saying some taunts(randomly not everytime his attacked) . . . like in the campaigns of Warcraft III


:vw_wtf: :vw_wtf: :vw_wtf: :vw_wtf: :vw_wtf: :vw_wtf: :vw_wtf: :vw_wtf:
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Use the play sound natives.

The control logic behind the taunt could be like the folllowing pesudo code.
<Taunt>{
when attacked
with a medium probability {
play taunt sound
display taunt text
turn off <Taunt>
Start timer for <Taunt Cooldown>
}
}

<Taunt Cooldown>{
when timer expires
turn on <Taunt>
}

The approach is a cooldown based taunt system that randomly fires. When it fires it starts cooldown stopping it from firing until cooldown completes. When not in cooldown it will randomly fire every time he is attacked.
 
Status
Not open for further replies.
Top