rexpim
Member
- Reaction score
- 8
So i got this but got one problem, no tree is showing up
added
GTrigger
JASS:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// -Made By REX helped by members of <a href="http://www.thehelper.net/" class="link link--internal">http://www.thehelper.net/</a>
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//===========================================================================
scope NatureStrike
globals
private constant integer NATURESTRIKE = 039;A01U039; // Nature Strike RAW CODE
private constant integer TREE = 039;BTtw039; // Tree RAW CODE
private constant integer VAR = 2 // Tree variation
private constant real SCALE = 2.00 // Tree scale size
private constant real LIFE = 20.00 // Tree life time
endglobals
//===========================================================================
//===========================================================================
private struct data
private timer t
private destructable FSTREE
static method kill takes nothing returns nothing
local thistype this=GetTimerData(GetExpiredTimer())
call RemoveDestructable(.FSTREE)
call ReleaseTimer(GetExpiredTimer())
set .FSTREE=null
set .t=null
endmethod
static method create takes nothing returns thistype
local thistype this=.allocate()
set .t=NewTimer()
set .FSTREE = CreateDestructable(TREE, GetSpellTargetX(), GetSpellTargetY(), GetRandomReal(1.,360.),SCALE,VAR) // use of coordinates instead of locations
call SetTimerData(.t,this)
call TimerStart(t,LIFE,false,function thistype.kill)
return this
endmethod
endstruct
private function Trig_NatureStrike_Actions takes nothing returns nothing
local data t=data.create()
endfunction
//===========================================================================
pprivate function InitTrig_NatureStrike takes nothing returns nothing
call TriggerAddAction(GT_RegisterStartsEffectEvent(CreateTrigger(),NATURESTRIKE),function Trig_NatureStrike_Actions)
endfunction
endscope
added
JASS:
private function InitTrig_NatureStrike takes nothing returns nothing
call TriggerAddAction(GT_RegisterStartsEffectEvent(CreateTrigger(),NATURESTRIKE),function Trig_NatureStrike_Actions)
endfunction