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

Spinner Trigger

Status
Not open for further replies.
Level 2
Joined
May 31, 2008
Messages
8
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: 156
  • spinner2.gif
    spinner2.gif
    153.2 KB · Views: 160
  • spinner3.gif
    spinner3.gif
    157.2 KB · Views: 150
  • spinner4.gif
    spinner4.gif
    222.7 KB · Views: 146
  • spinner5.gif
    spinner5.gif
    86.6 KB · Views: 128
Level 21
Joined
Aug 21, 2005
Messages
3,699
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)
 
Level 10
Joined
Sep 6, 2007
Messages
440
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.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
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.
Top