• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Need help with coding...

Status
Not open for further replies.
Level 12
Joined
Mar 30, 2013
Messages
664
Greetings,

I wonder if anyone can help me out with some coding..
1. Make a trigger run at XX seconds.
2. How to make a trigger stop running when a unit is killed.
3. How to make an item to DMG 20% to an enemy hero, and when used it will be removed from the inventory.

Would be cool if you could show me how.
Thanks!
 
1. After a ceratin time or periodic?
2. You can turn trigger off this prevents them from running because of their events. They can still be running by "run trigger".
3. Item:
actively used=true
number of charges=1
perishable=true
Add a target ability like finger of death. Use a trigger to deal damage.
 
Thanks for the reply.

1. Elapsed game time is 300 seconds activate the trigger "Run"...
2. ?
3. Ok, i will try create it, i will report back if i managed to do it or not.

I would appreciate if you could create the triggers and post them here, it would make it a lot easlier!
Thanks.
 
1.
This trigger runs after 300 seconds.
  • RunAtTime
    • Events
      • Time - Elapsed game time is 300.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: this trigger runs a...
2.
StopRunning is the trigger you want to stop running.
If the trigger StopRunning is already running this will not interrupt it.
It only stops future runs of the trigger.

If you want that a specific unit needs to be killed, you can use the specifc unit event.
  • UnitKilled
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Trigger - Turn off StopRunning <gen>
 
Here is a map. It's diffcult to explain everything here.

As Chaosy said it is a good idea to use a healing potion as the base item, as it also can only be used once.
Change the ability to a ability like finger of death, that deals 0 damage.
Make a trigger that runs when the item is used (a unit starts the item ability) and deal the damage with a trigger.

A problem on my current map is, that the lightning effect is not displayed due to the fact, that the item gets removed, before the lightning effect starts.
This bug can be fixed of course, but I did not want to make the map unnecessarily complicated.
 

Attachments

Status
Not open for further replies.
Back
Top