• 🏆 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!

Need help for my spell here...

Status
Not open for further replies.
Level 7
Joined
Oct 24, 2006
Messages
110
Well, I am a participant in The Helper's Hero Contest #2..

Contestants are allowed to ask for help about spells, but not allowed to make requests, and so I'm only asking for urgent help here on how to solve this..

One more thing, the spells 4 heroes in the contest should be totally GUI. Only use JASS to remove leaks, no locals, functions or code other than to remove leaks.

This spell, called Orb of Shiva, will slow down any enemy in the target point.
It's based on Channel, has 3 levels...

  • Orb of Shiva
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Orb of Shiva
    • Actions
      • Set OS_Caster = (Triggering unit)
      • Set OS_Level = (Level of Orb of Shiva for OS_Caster)
      • Set OS_AOE = (200.00 + (25.00 x (Real(OS_Level))))
      • Set OS_Damage = (75.00 + (20.00 x (Real(OS_Level))))
      • Set OS_CasterLoc = (Position of OS_Caster)
      • Set OS_TargLoc = (Target point of ability being cast)
      • Unit - Create 1 Orb of Shiva (Missile Dummy) for (Owner of OS_Caster) at OS_CasterLoc facing (Facing of OS_Caster) degrees
      • Unit - Order (Last created unit) to Attack Ground OS_TargLoc
      • Unit - Add a 0.25 second Generic expiration timer to (Last created unit)
      • Countdown Timer - Start OS_Timer as a One-shot timer that will expire in ((Distance between OS_CasterLoc and OS_TargLoc) / 400.00) seconds
      • Custom script: call RemoveLocation(udg_OS_CasterLoc)
      • Custom script: call RemoveLocation(udg_OS_TargLoc)
The above trigger works perfectly as planned, but the second trigger has a major problem..

  • Orb of Shiva Effect
    • Events
      • Time - OS_Timer expires
    • Conditions
    • Actions
      • -------- The text shows up!! Just to prove that the trig in-game is fired --------
      • Game - Display to (All players) the text: Damage!!
      • -------- But this function doesn't work!! It is supposed to work... but I don't know why it doesn't work. --------
      • Set OS_Filter = (Units within OS_AOE of OS_TargLoc)
      • Unit Group - Pick every unit in OS_Filter and do (Actions)
        • Loop - Actions
          • Unit - Cause OS_Caster to damage (Picked unit), dealing OS_Damage damage of attack type Normal and damage type Normal
It's supposed to slow enemy units down. I simplified the Pick Every Unit action to only have the damage action so that you could easily find out what's the problem.

Anyone know how to solve this? +rep for helping..
 
Status
Not open for further replies.
Top