HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger and random sound play Problem

03-06-2009, 08:19 PM#1
Crusher
1st Question:

I have some problem with this trigger ( Description of this trigger - This trigger is used to slow enemy hero when his hitpoints go at 20% .) But the problem is that the slow effect doesn't appear , but the trigger works fine . So I think something is messed up and if someone can check :


Trigger:
Initialization Finish Him
Collapse Events
Unit - A unit enters (Playable map area)
Collapse Conditions
((Entering unit) is A Hero) Equal to True
((Entering unit) is in AddedHeroGroup) Equal to False
Collapse Actions
Unit Group - Add (Entering unit) to AddedHeroGroup
Trigger - Add to FINISH HIM <gen> the event (Unit - (Entering unit) Takes damage)
Trigger - Add to FINISH HIM undo <gen> the event (Unit - (Entering unit) Takes damage)


Trigger:
FINISH HIM
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
((Triggering unit) is in Finished) Equal to False
(Percentage life of (Triggering unit)) Less than or equal to 15.00
Collapse Actions
Unit Group - Add (Triggering unit) to Finished
Unit - Create 1 DummySlow for (Owner of (Damage source)) at (Position of (Damage source)) facing (Position of (Triggering unit))
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Finish Him! to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Slow (Triggering unit)
Game - Display to (All players) the text: ((|c00ff0000Finish|r + PlayerColours[(Player number of (Owner of (Triggering unit)))]) + |c00ff0000!|r )
Sound - Play finishim <gen>

Trigger:
FINISH HIM undo
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
((Triggering unit) is in Finished) Equal to True
(Percentage life of (Triggering unit)) Greater than or equal to 20.00
Collapse Actions
Unit Group - Remove (Triggering unit) from Finished
Unit - Remove Finish Him! buff from (Triggering unit)


Well about the '' First Blood '' Trigger now ; Is this good? I mean the trigger is looking ok and it will trigger ok?


Trigger:
First Blood
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Owner of (Killing unit)) slot status) Equal to Is playing
((Owner of (Killing unit)) controller) Equal to User
((Owner of (Dying unit)) slot status) Equal to Is playing
((Owner of (Dying unit)) controller) Equal to User
((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
((Dying unit) is A Hero) Equal to True
((Killing unit) is A Hero) Equal to True
Collapse Actions
Sound - Play firstblood <gen>
Player - Add 200 to (Owner of (Killing unit)) Current gold
Quest - Display to (All players) the Hint message: ((|cff00ccffFirst Blood|r - + PlayerColours[(Player number of (Owner of (Dying unit)))]) + ( has been killed by + (PlayerColours[(Player number of (Owner of (Killing unit)))] + for an additional |c00f0f000+200|r Gold.)))
Trigger - Turn off (This trigger)


Another one Question :

I tried to set it like this , but I don't think this is working ( Im using variable called ''Music_Random'' , type ''Sound'' and ''Array 1''.


Trigger:
Map Initialization
Set Music_Random[1] = BloodElfTheme01 <gen>
Set Music_Random[2] = BloodElfTheme02 <gen>
Set Music_Random[3] = BloodElfTheme03 <gen>

then after 10 seconds i do this :

Trigger:
Actions
Sound - Clear the music list
Sound - Play Music_Random[(Random integer number between 1 and 4)]

Also tried without clear the music list.
03-08-2009, 07:40 AM#2
Crusher
Bump!