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

SFX Pitch

Level 18
Joined
Mar 21, 2011
Messages
1,622
Hello,
short and hopefully simple question.
What is the best formula to get a working radiant for the SFX pitch? Whenever i try to rotate an object, it starts flickering, so it probably requres something like PI/2 in its formula?
I am trying for literal hours now but obviously i am too retarded.
Best solution for me would be a degree input (0 - 360), and the correct radiant outcome for the pitch.
thanks in andvance
 
JASS:
scope s initializer OnInit

   globals
      real angle = 0.
      effect sfx = null
   endglobals

   function OnPeriodic takes nothing returns nothing
      set angle = angle + 0.5
      call BlzSetSpecialEffectPitch(sfx, DegToRad(angle))
   endfunction

   private function OnInit takes nothing returns nothing
      set sfx = AddSpecialEffect("SomeEffect", 0., 0.)
      call TimerStart(NewTimer(), true, 0.03125, OnPeriodic)
   endfunction

endscope

pretty much like this
 
Back
Top