so a skill i have creates a dummy unit (has model) and that unit goes in a line until it's expiration timer is done and it dies. i have made the spell to work just fine in GUI but i need it MUI and my GUI method isnt so im changing it to JASS.
My JASS Attempt:
Thanks
YO_MA_MA
EDIT: 20 views and no reply i know it isnt THAT hard.... is it? *gulp*
-
BoomStick
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to BoomStick
-
Actions
- Set BoomStickerUnit = (Triggering unit)
- Animation - Play BoomStickerUnit's Spell animation
- Set BoomStickerPoint = (Position of BoomStickerUnit)
- Set BoomStickPoint = (Target point of ability being cast)
- Set DirectionOfBoomstick = (Angle from BoomStickerPoint to BoomStickPoint)
- Unit - Create 1 Boom Stick for (Owner of BoomStickerUnit) at BoomStickerPoint facing DirectionOfBoomstick degrees
- Set BoomStickDummy = (Last created unit)
- Unit - Add a 2.00 second Generic expiration timer to BoomStickDummy
- Set BoomStickInt = 0
- Trigger - Turn on BoomStick effect <gen>
- Wait 3.00 seconds
- Trigger - Turn off BoomStick effect <gen>
- Set BoomStickerUnit = No unit
- Set BoomStickDummy = No unit
- Set DirectionOfBoomstick = 0.00
- Custom script: call RemoveLocation(udg_BoomStickerPoint)
-
Events
-
BoomStick effect
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Set BoomStickInt = (BoomStickInt + 1)
- Unit - Move BoomStickDummy instantly to (BoomStickerPoint offset by ((Real(BoomStickInt)) x 15.00) towards DirectionOfBoomstick degrees), facing DirectionOfBoomstick degrees
-
Events
My JASS Attempt:
JASS:
function Trig_BoomStick_JASS_Actions takes nothing returns nothing
local unit BSUnit = GetTriggerUnit()
local unit BSDummy
local location BSCasterLoc = GetUnitLoc(BSUnit)
local location BSTargetLoc = GetSpellTargetLoc()
local real BSReal = AngleBetweenPoints(BSCasterLoc, BSTargetLoc)
local integer i = 0
call SetUnitAnimation( BSUnit, "Spell" )
set BSDummy = CreateUnitAtLoc(GetOwningPlayer(BSUnit), 'h005', BSCasterLoc, BSReal)
call UnitApplyTimedLife(BSDummy, 'BTLF', 3.00)
loop
exitwhen BSDummy == null
set i = i + 1
call SetUnitPositionLocFacingBJ( BSDummy, PolarProjectionBJ(BSCasterLoc, ( I2R(i) * 15.00 ), BSReal), BSReal)
call TriggerSleepAction( 0.01 )
endloop
set BSUnit = null
set BSDummy = null
set BSReal = 0.00
call RemoveLocation(BSCasterLoc)
call RemoveLocation(BSTargetLoc)
endfunction
YO_MA_MA
EDIT: 20 views and no reply i know it isnt THAT hard.... is it? *gulp*
Last edited: