Re: Wisp Wheel
Posted: Sun Apr 10, 2011 6:14 pm
You mean completely ruined and unusable. :Pshinning_faith wrote:slightly edited
You mean completely ruined and unusable. :Pshinning_faith wrote:slightly edited
roflmfao fuck you3ICE wrote:You mean completely ruined and unusable.shinning_faith wrote:slightly edited
that was convenient for what i was doing in my map easily editing something such as a wisp wheel shouldn't be so difficult3ICE wrote:Yeah, because 180° spins every 0.03 seconds is going to look good in a game...
It is difficult. Code written by someone else can be extremely confusing.shinning_faith wrote:shouldn't be so difficult
Oh how cocky I was back then...3ICE wrote:Definition of Whisp wheel by 3ICE: Common obstacles in maze-type maps. Units (usually wisps due to their simple shape) moving in a circle around a point (or another unit).Warning!
These maps are very old. I had no knowledge of memory leaks or even JASS back then. Any copied triggers should be updated to handle memory leaks properly.
Code: Select all
//===========================================================================
// Trigger: Spin Wisps Linear Direction Changed
//
// Notice: memory leaks r not a big deal, only a 100 is created each second.
//===========================================================================
Code: Select all
//===========================================================================
// Trigger: Make Wisps Circular Patrol
//
// Method of counting the angle:
// Divide 360 by the number of wisps you have lets call the result: X
// first wisp always 0
// second wisp X
// third wisp 2X
// fourth wisp 3X
// fifth wisp 4X
// and so on and forth
// (in my case X was 72)
//===========================================================================
Code: Select all
function Trig_Setup_Spin_by_3ICE_Actions takes nothing returns nothing
// Before you start please Set the collision of the units to ZERO! Otherwise this system will not work properly. (in case distance is less than 70)
// Change the No Unit to the unit you want to be the center unit. YOU CAN USE ANYTHING EVEN BUILDINGS (but careful)
set udg_Setup_Spin_Around_me_3ICE = null
// Change the No Units to the units you want to be spinned around the center unit. YOU CAN USE ANYTHING EVEN BUILDINGS (but careful)
set udg_Setup_Spin_me1_3ICE = null
set udg_Setup_Spin_me2_3ICE = null
// Change the 0 to the value you want to be the distance between the central unit and the spinning units (recommended: 50-300)
set udg_Setup_Distance_3ICE = 0.00
// Change the 0 to the value you want to be the speed of the spinning units (recommended: 5-10)
set udg_Setup_Speed_3ICE = 0.00
// Change the 0s to the angles you want the spin to start at (recommended 90 and 270)
set udg_A_3ICE = 90.00
set udg_B_3ICE = 270.00
// Additional note: You can (SHOULD!) patrol the center unit, the spin will still go around it.
// Change the (Center of (Playable map area)) to any region you want the center unit to patrol to.
call IssuePointOrderLocBJ( udg_Setup_Spin_Around_me_3ICE, "patrol", GetRectCenter(GetPlayableMapRect()) )
// This one is only needed for Variable Autocreation, so Don't mind it!
set udg_P_3ICE = GetRectCenter(GetPlayableMapRect())
endfunction
Code: Select all
function Trig_Spin_by_3ICE_Actions takes nothing returns nothing
set udg_P_3ICE = GetUnitLoc(udg_Setup_Spin_Around_me_3ICE)
set udg_A_3ICE = ( udg_A_3ICE + udg_Setup_Speed_3ICE )
set udg_B_3ICE = ( udg_B_3ICE + udg_Setup_Speed_3ICE )
call SetUnitPositionLoc( udg_Setup_Spin_me1_3ICE, PolarProjectionBJ(udg_P_3ICE, udg_Setup_Distance_3ICE, udg_A_3ICE) )
call SetUnitPositionLoc( udg_Setup_Spin_me2_3ICE, PolarProjectionBJ(udg_P_3ICE, udg_Setup_Distance_3ICE, udg_B_3ICE) )
call RemoveLocation(udg_P_3ICE)
endfunction
function InitTrig_Spin_by_3ICE takes nothing returns nothing
set gg_trg_Spin_by_3ICE = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spin_by_3ICE, 0.05 )
call TriggerAddAction( gg_trg_Spin_by_3ICE, function Trig_Spin_by_3ICE_Actions )
endfunction
Code: Select all
function Trig_Init_show_off_Actions takes nothing returns nothing
// YOU DON'T NEED THIS FOR YOUR MAP!
set udg_Setup_Spin_Around_me_3ICE = gg_unit_odoc_0012
set udg_Setup_Spin_me1_3ICE = gg_unit_ewsp_0013
set udg_Setup_Spin_me2_3ICE = gg_unit_earc_0014
set udg_Setup_Distance_3ICE = 150.00
set udg_Setup_Speed_3ICE = 7.00
call IssuePointOrderLocBJ( udg_Setup_Spin_Around_me_3ICE, "patrol", GetRectCenter(gg_rct_Credit_3ICE) )
// YOU DON'T NEED THIS FOR YOUR MAP!
call FogEnableOff( )
call FogMaskEnableOff( )
call DisplayTimedTextToForce( GetPlayersAll(), 333.33, "TRIGSTR_001" )
// YOU DON'T NEED THIS FOR YOUR MAP!
endfunction
Code: Select all
STRING 1: |cff00ff00Map created by 3ICE
|cffff0000Give me credit!
STRING 2: 3ICE's Simple Spinning System
STRING 4: HF |cffff0000And credit me!
STRING 6: 3ICE Presents:
STRING 7: Simple Spin System
STRING 8: Copy the triggers into your map and credit me
|cffff0000Credit 3ICE
STRING 21: Map by 3ICE
STRING 22: Observers
STRING 25// Units: earc (Frost), Name (Name): Frost
STRING 26// Units: ewsp (Poison), Name (Name): Poison