• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Hero Defense Trigger (ask help)

Status
Not open for further replies.
Level 2
Joined
Sep 13, 2007
Messages
9
Hi all,

I have a question regarding of the trigger im making, currently im making a Hero defense map, in which i want the wave of enemies that swarm through heroes to have a 15% chance to drop items once they killed, I have completed the hero selection process trigger, but now i have a problem to think of the trigger fro this one.... can someone help me?

Thanks
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
  • Events
    • Unit - A Unit dies
  • Conditions
    • owner of triggering Unit is enemy player
  • Actions
    • set <dropchance> random number between 1 and 100
    • if <dropchance> less or equal to 15 then create an item at position of dying Unit
<dropchance> is an integer variable
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Chance
  • Events
    • Unit - A unit dies
  • Conditions
    • ----
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • 'IF'-Conditions
      • (Random integer number from 1 to 100 greater or equal than 85)
    • 'THEN'-Actions
      • If (random integer number between 1 and x equal to 1) then do drop *itemtype* from (Dying unit) else do (Do nothing)
      • If (random integer number between 1 and x equal to 2) then do drop *itemtype2* from (Dying unit) else do (Do nothing)
      • ...
    • 'ELSE'-Actions
x = Number of items which are supposed to be dropped

Argh, urede4d was faster :)
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Just a tip, 15% may be a little much for a Hero Defense, if you are using lot's of enemies(like in enfo). See it like this, if each wave would be 100 units, then 15 units would drop an item every wave.
If each wave would be 50 units, then 7-8 units would drop an item every wave.

I think you should reduce it to 10% or even better 5%, if it is good items.

*My balancing sense is tingling!*
 
Level 2
Joined
Sep 13, 2007
Messages
9
Yeah.... was thinkin about that too.... maybe i could combined it with some rare and artifact drops, which of couse i'll nerf the drop rates.....

Thanks for the idea Terra.....


EDIT:
hmm guys i still cant make this works....for 'event' and 'condition' i can make it so far... but for 'action' i cant seem to find the 'random number', whether it's Variable or what..... can someone clrea this out for me pls....


thanks

Do NOT double-post. Use the Edit Post button.
~Posts Merged
 
Last edited by a moderator:
Level 17
Joined
Jan 21, 2007
Messages
2,013
I often add that in the conditions. Create a condition and go to Integer - Math - Random number. Ther u set it to random number between 1 and 100 less than or equal to 15.
Then u just create the item, but you might want to do an If/then/else function that checks which unit it is and drop an item according to that.
 
Status
Not open for further replies.
Top