Warcraft III resources & community, 2003–2006 · archived

Need Trigger Help

24 posts
#16
Can you post the trigger in its entirety? The fragments aren't quite enough to piece together the whole thing.
#17
Ok heres the whole trigger so far, and it doesn't work...



Events
Unit - Necromancer 0021 <gen> Is selected

Condtions

Actions
Unit - Create 1 Necromancer for (Triggering Player) at (center of HeroSelected <gen>) facing Default building facing degrees

Unit - Reamove Necromancer 0021 <gen> from the game

Special Effect - Create a special effect at (position of Necromancer 0021 <gen>) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl

Wait 1.00 seconds

Camera - Pan camera for (Triggering Player) to (center of HeroSelected <gen>) over 0.00 seconds

Visibility - Create an initialy Enabled visibility modifier for (Triggering Player) emitting Black mask across HeroChooseHill <gen>

Visibility - Create an initialy Enabled visibility modifier for (Triggering Player) emitting Fog of war across HeroChooseHill <gen>
#18
Juice_F, assume that the player1 is a computer, and also assume the START LOCATION is where the spawn point is. In custom maps, using dummy units is effective substitution of simple regions
Events
Unit - Paladin 0001 <gen> Is selected
Conditions
((Triggering player) is an ally of Player 1 (Red)) Equal to True
Actions
Trigger - Turn off (This trigger)
Unit - Move Paladin 0001 <gen> instantly to (Player 1 (Red) start location)
Unit - Change ownership of Paladin 0001 <gen> to (Triggering player) and Change color
Special Effect - Create a special effect at (Player 1 (Red) start location) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
-------- Visibility stuff --------
#19
Also, Juice_F, if you right-click on the top line of a trigger and select "Copy as Text" you can just paste it here wholesale. In the future, you'd be well-served by putting it in [code] tags.

Also, having a Wait of any kind in your trigger gives it the opportunity to overwrite information like (Triggering Player) and any other globals after the wait, which could screw it up. Alternatives are to set all the globals to locals and jass the trigger, set globals to global arrays indexed by player number, or eliminate the wait.
#20
I tryed Eusiras trigger but it didn't work, still the same problem, the unit is created for the previus owner. For some reason it seems to think that the triggering player is the previous owner.
#21
I said to change ownership, not spawn a new one
#22
well thats what i did but it either didn't change ownership or changed ownership to the previous owner
cuz it's still player 12
#23
OK if this is done by icons, then i cant help,but if its done by modles, simply make a wisp for eahc player, and give it a spell called pick hero
Lets say the hero is a paladin....
EVENTS
-Unit begins casting a spell
CONDITIONS
-Targeted unit equal to [Paladin]
-Ability being cast equal to [Pick Hero]
ACTIONS
-Create 1 [Paladin] for Owner of Casting unit at center of [Region 000]
--Visual Stuff--
-Wait 0.10
-Disable this Trigger
#24
I solved the problem!!! Here is what I came up with...

Untitled Trigger 003
Events
Unit - Huntress 0042 <gen> Is selected

Conditions

Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Huntress 0042 <gen> is selected by Player 1 (Red)) Equal to True
Then - Actions
Unit - Create 1 Huntress for Player 1 (Red) at (Center of HeroSelected <gen>) facing Default building facing degrees
Unit - Remove Huntress 0042 <gen> from the game
Special Effect - Create a special effect at (Position of Huntress 0042 <gen>) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Wait 1.00 seconds
Camera - Pan camera for Player 1 (Red) to (Center of HeroSelected <gen>) over 0.00 seconds
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Black mask across HeroChooseHill <gen>
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across HeroChooseHill <gen>
Else - Actions
Do nothing

Then i just did the same action 2 more times and it works fine.
But Thx to all of you who tried to help me