HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why doesnt my trigger work?

07-04-2006, 09:11 PM#1
GamesSmash
Thanks for your help, these are the problems in my trigger:

First Trigger : When I try to use the trigger, no one on the map gets their mana set to 0%, the special effect doesn't get attached to each unit, "Dragonhawkpissed7" and "Deathsheepswim" dont work, and the volcano dies right away.

Second Trigger: After "Set life of casting unit to 50%" nothing works except for the "Display to all players" commands which don't list the name of the owned of the dying unit. For example, the message would be "Gamessmash has damned . He will die in 120 seconds."

If someone could help, I would be willing to upload my map.

----------------------------------------------------------------------EDITED
Why does this trigger not work?
Sorry I don't know how to take a picture of my editor. Someone help.


storm earth fire
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Storm Earth Fire!
Actions
Set volcanocast = (Target point of ability being cast)
Game - Display to (All allies of (Owner of (Casting unit))) the text: Your mana has been ...
Sound - Play PH1 <gen>
Wait 3.00 game-time seconds
Sound - Stop PH1 <gen> After fading
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Set mana of (Picked unit) to 0.00%
Destructible - Create a Volcano at volcanocast facing (Random angle) with scale 3.00 and variation 50
Unit Group - Pick every unit in (Units within 1000.00 of volcanocast) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Sheep Kills.
Then - Actions
Do nothing
Else - Actions
Unit - Order (Picked unit) to Hold Position
Environment - Create a 20.00 second Temporary crater deformation at (Position of (Picked unit)) with radius 200.00 and depth -500.00
Unit - Make (Picked unit) Explode on death
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Animation - Change (Picked unit)'s size to (450.00%, 450.00%, 450.00%) of its original size
Unit Group - Pick every unit in (Units within 1000.00 of volcanocast) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Sheep Kills.
Then - Actions
Do nothing
Else - Actions
Sound - Play DragonHawkPissed7 <gen>
Wait 1.00 game-time seconds
Unit - Cause (Casting unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
Sound - Play SheepDeathSwim1 <gen>
Destructible - Kill (Last created destructible)
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Set mana of (Picked unit) to 100.00%

-------------------------------------------------------------
This other trigger doesnt work either:


Damned Skull
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Damned Skull
Actions
Sound - Play KelThuzadYesAttack1 <gen> at 100.00% volume, attached to (Target unit of ability being cast)
Wait 1.10 game-time seconds
Sound - Play KelThuzadYesAttack2 <gen> at 100.00% volume, attached to (Target unit of ability being cast)
Unit - Set life of (Casting unit) to 50.00%
Special Effect - Create a special effect at (Position of (Casting unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) + ( has damned + ((Name of (Owner of (Target unit of ability being cast))) + He will die in 120 seconds!)))
Animation - Change (Target unit of ability being cast)'s size to (50.00%, 50.00%, 50.00%) of its original size
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
Wait 120.00 game-time seconds
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Target unit of ability being cast)), dealing 10000.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Wait 380.00 game-time seconds
Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
Wait 2.00 game-time seconds
Unit - Kill (Casting unit)
Special Effect - Create a special effect at (Position of (Casting unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
07-04-2006, 09:17 PM#2
Captain Griffen
Use trigger tags.
07-04-2006, 09:21 PM#3
GamesSmash
I dont know how to program. What is trigger tag and how do i save the screen in GUI format like you guys all do.
07-04-2006, 09:52 PM#4
King Klear
The trigger tag is inserted by this icon:
It's the last one on the right, when you "Go advanced"

It should look like this:

Code:
[trigger]Unit - A unit Begins casting an ability[/trigger]

And the result will be this:

Trigger:
Unit - A unit Begins casting an ability
07-04-2006, 10:01 PM#5
Captain Griffen
Like this:

Trigger:
storm earth fire
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Storm Earth Fire!
Collapse Actions
Set volcanocast = (Target point of ability being cast)
Game - Display to (All allies of (Owner of (Casting unit))) the text: Your mana has been ...
Sound - Play PH1 <gen>
Wait 3.00 game-time seconds
Sound - Stop PH1 <gen> After fading
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Unit - Set mana of (Picked unit) to 0.00%
Destructible - Create a Volcano at volcanocast facing (Random angle) with scale 3.00 and variation 50
Collapse Unit Group - Pick every unit in (Units within 1000.00 of volcanocast) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Unit-type of (Picked unit)) Equal to Sheep Kills.
Collapse Then - Actions
Do nothing
Collapse Else - Actions
Unit - Order (Picked unit) to Hold Position
Environment - Create a 20.00 second Temporary crater deformation at (Position of (Picked unit)) with radius 200.00 and depth -500.00
Unit - Make (Picked unit) Explode on death
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Animation - Change (Picked unit)'s size to (450.00%, 450.00%, 450.00%) of its original size
Collapse Unit Group - Pick every unit in (Units within 1000.00 of volcanocast) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Unit-type of (Picked unit)) Equal to Sheep Kills.
Collapse Then - Actions
Do nothing
Collapse Else - Actions
Sound - Play DragonHawkPissed7 <gen>
Wait 1.00 game-time seconds
Unit - Cause (Casting unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
Sound - Play SheepDeathSwim1 <gen>
Destructible - Kill (Last created destructible)
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Unit - Set mana of (Picked unit) to 100.00%


Trigger:
Damned Skull
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Damned Skull
Collapse Actions
Sound - Play KelThuzadYesAttack1 <gen> at 100.00% volume, attached to (Target unit of ability being cast)
Wait 1.10 game-time seconds
Sound - Play KelThuzadYesAttack2 <gen> at 100.00% volume, attached to (Target unit of ability being cast)
Unit - Set life of (Casting unit) to 50.00%
Special Effect - Create a special effect at (Position of (Casting unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) + ( has damned + ((Name of (Owner of (Target unit of ability being cast))) + He will die in 120 seconds!)))
Animation - Change (Target unit of ability being cast)'s size to (50.00%, 50.00%, 50.00%) of its original size
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
Wait 120.00 game-time seconds
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Target unit of ability being cast)), dealing 10000.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Wait 380.00 game-time seconds
Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
Wait 2.00 game-time seconds
Unit - Kill (Casting unit)
Special Effect - Create a special effect at (Position of (Casting unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl

Ok, first one: try using Not equal to, and swapping around the then and else actions (and leave out the 'do nothing', which is a waste of space). Also, one way or another you will have to remove those waits in the unit group loops. Suggest you also read a tutorial on memory leaks.

Second one you are probably best off with someone writing you out a JASS trigger, as it is going to need locals.

General thing - use Unit starts effect of ability for ability effects.
07-04-2006, 10:04 PM#6
Thunder_Eye
Uhm in the first trigger, storm earth and fire isnt a point-target ability if I remember right. It's a non target (unless you're using a custom ability with that name)
07-04-2006, 11:59 PM#7
Daxtreme
Could we know what isn't working exactly ?

Like... What is it supposed to do and what does it do when you cast it?
07-05-2006, 11:17 PM#8
GamesSmash
Note I edited my post