• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Trigger] Coded Right?

Status
Not open for further replies.
Level 4
Joined
May 3, 2009
Messages
69
  • Meteora Level 4
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is A Hero) Equal to True
      • ((Attacking unit) has buff Meteora (Level 4)) Equal to True
    • Actions
      • Set MeteoraPos = (Position of (Triggering unit))
      • Set Roll = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Roll Less than or equal to 10
        • Then - Actions
          • Special Effect - Create a special effect at MeteoraPos using Units\Demon\Infernal\InfernalBirth.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius 400.00 at MeteoraPos, dealing 200.00 damage of attack type Chaos and damage type Fire
        • Else - Actions
          • Do nothing
      • Set Roll = 0
      • Custom script: call RemoveLocation(udg_MeteoraPos)
Is there a way to make it smaller??

Am I posted correct place?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,233
Do nothing is not needed. It does nothing but waste time.
Instead of 1 to 100 and less than or equal to 10, try 0 to 9 and equal to 0. Will produce the same result (10% chance) but overall deal with smaller numbers so should be more efficent.

I would also advise a damage dectection system, as currently by stopping the unit repetitivly, a player could cause this spell to execute far more than desired by getting the unit to trigger the event but not actually completing the attack (and starting attack cooldown).
 
Level 14
Joined
Nov 4, 2006
Messages
1,240
you can leave out the "Do nothing", just make it blank, and you don't need the "set roll = 0" ; but apart from that, why you think its too long? i guess you have 4 triggers of that kind and you are asking if its possible to make it up with a single one right?
 
Level 4
Joined
May 3, 2009
Messages
69
you can leave out the "Do nothing", just make it blank, and you don't need the "set roll = 0" ; but apart from that, why you think its too long? i guess you have 4 triggers of that kind and you are asking if its possible to make it up with a single one right?

Actually yes. I get ONLY 8 triggers for just one spell. Um ok i will request this spell in requests section then. :(
 
Status
Not open for further replies.
Top