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

Need Trigger Help

Status
Not open for further replies.
Level 16
Joined
Jul 19, 2004
Messages
513
I'm working on an map and I need help with one trigger. It's an hero revive trigger, I want the hero to revive after the level of the hero x 5 seconds.

The trigger right now looks like this:
Event:
Unit - A unit owned by player 1 dies
Conditions:
((Dying unit) is a hero) equal to true
Actions:
Countdown timer - start revivetimer as a one-shot timer that will expire in (Here is where i need help)

The rest is not nesesary to write, I hope you understand what I mean.
 
Level 3
Joined
Oct 28, 2004
Messages
48
why not just add wait 5 seconds, then as another action, revive hero where ever you want it to revive?
 
Level 16
Joined
Jul 19, 2004
Messages
513
Becouse I want it to take longer to revive it the higher the lvl of the dead hero is.

And hey, I need help again with another thing.
this time it's about choosing hero, it's realy irritating that I can't get this to work myself.
It's an ToB style hero selection.

Event:
Unit - Necromancer 0021 <gen> is selcted
Conditons:
Actions:
Unit - Create 1 Necromancer for ??? what shall I put here? I want the person who selected the unit to get the unit and I can't get it to work.

So how shall I do it?
 
Level 5
Joined
Jul 15, 2004
Messages
148
Why not just have a unit (such as a wisp) and give it a dummy ability that enables it to cast on a target hero. Have the wisp cast the spell on the hero you want to have, and the create the hero for the owner of the casting unit. I know thats not exactly what you wanted, but it's pretty easy to do ;).
 
Level 16
Joined
Jul 19, 2004
Messages
513
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>
 
Level 16
Joined
Sep 3, 2004
Messages
2,086
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 --------
 
Level 8
Joined
Apr 3, 2004
Messages
507
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.
 
Level 9
Joined
Oct 28, 2004
Messages
533
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
 
Level 16
Joined
Jul 19, 2004
Messages
513
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
 
Status
Not open for further replies.
Top