• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your 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