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

Spinner Trigger

Status
Not open for further replies.

ImBamboo

I

ImBamboo

I was wondering if there was a more efficient way of creating a trigger like this. Or if anyone could see a potential leak or problem in it. It creates an effect that circles the unit. When finished it will damage units the spinner comes into contact with; I'm unsure of the most efficient way to do this. Right now I'd likely pick units within range of temp_point. I might make the loop run less often but I'm really not sure right now.

I've attached a couple images of it also since my description is likely terrible.

  • Spin Me
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Spin_Real = (Spin_Real + 10.00)
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Temp_Real = (Temp_Real + 15.00)
          • Set Temp_Point = ((Position of Guy) offset by (50.00 x (Real((Integer A)))) towards (Spin_Real - Temp_Real) degrees)
          • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Items\AIco\CrownOfCmndTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: set udg_Temp_Real = 0.00
 

Attachments

  • spinner1.gif
    spinner1.gif
    174.1 KB · Views: 213
  • spinner2.gif
    spinner2.gif
    153.2 KB · Views: 204
  • spinner3.gif
    spinner3.gif
    157.2 KB · Views: 206
  • spinner4.gif
    spinner4.gif
    222.7 KB · Views: 193
  • spinner5.gif
    spinner5.gif
    86.6 KB · Views: 185
lol first he leaks 1 place, then 2 and now 8 :grin:

He leaks 16 points xD

Set Temp_Point = ((Position of Guy) offset by (50.00 x (Real((Integer A)))) towards (Spin_Real - Temp_Real) degrees)

Position of Guy is point 1. Temp_Point itself is point 2, since its never removed using RemoveLocation. 2 * 8 = 16 :p

(next guy should probably say 32 points or something)
 
32! 32! 32! 32!

Remember to set the other reals/integers to 0 and remove locations, ImBamboo...

And yes, there're a lot more efficient ways to do what you've done there. You might want to check thehelper forums to see some good examples.
 
He leaks 16 points xD

Nah, 64.3 leaks.
Anyway, pwnt. Didn't notice he used a location inside the location.

Remember to set the other reals/integers to 0 and remove locations, ImBamboo...

The hell are you talking about ? You do not need to set any globals to zero/null and even further - you do not need to null any primitive type (int, boolean, float (AKA in warcraft: real), etc) -,-
 
Status
Not open for further replies.
Back
Top