- Joined
- Feb 11, 2011
- Messages
- 1,860
Hi guys,
I am fairly new to JASS and I am beginning to develop spells. I have created one which is like Shockwave except it has a different model. I want to use the model "Farseer Missile" for my Shockwave. One problem is that if I simply change to model of the Shockwave to Farseer Missile, the effect is half underground and half above ground. To fix this I have created a unit with the Farseer Missile model and changed the height. It also has the "Locust" ability. This ability is cast every second. I create the unit just after the dummy casts the shockwave and I make the unit move along the same path as the shockwave. It works, but half of the time only the unit is created and the shockwave isn't casted. Here is my script:
"udg_Boss_Unit" is the hero that "casts" this ability every second.
I know it is messy - please help me fix it! Thanks!
I am fairly new to JASS and I am beginning to develop spells. I have created one which is like Shockwave except it has a different model. I want to use the model "Farseer Missile" for my Shockwave. One problem is that if I simply change to model of the Shockwave to Farseer Missile, the effect is half underground and half above ground. To fix this I have created a unit with the Farseer Missile model and changed the height. It also has the "Locust" ability. This ability is cast every second. I create the unit just after the dummy casts the shockwave and I make the unit move along the same path as the shockwave. It works, but half of the time only the unit is created and the shockwave isn't casted. Here is my script:
JASS:
function Fury_of_the_Storm takes nothing returns nothing
local real r = GetRandomReal(1, 360)
local real x = GetUnitX(udg_Boss_Unit)
local real y = GetUnitY(udg_Boss_Unit)
local real x2 = GetLocationX(Location(x, y)) + 2000 * Cos(r * bj_DEGTORAD)
local real y2 = GetLocationY(Location(x, y)) + 2000 * Sin(r * bj_DEGTORAD)
call CreateNUnitsAtLoc(1, 'h003', GetOwningPlayer(udg_Boss_Unit), Location(x, y), bj_UNIT_FACING)
call UnitAddAbility(GetLastCreatedUnit(), 'A04X')
call IssuePointOrder(GetLastCreatedUnit(), "shockwave", x2, y2)
call UnitApplyTimedLife(GetLastCreatedUnit(), 'BTLF', 4)
call CreateNUnitsAtLoc(1, 'h00M', GetOwningPlayer(udg_Boss_Unit), Location(x, y), bj_UNIT_FACING)
call IssuePointOrder(GetLastCreatedUnit(), "move", x2, y2)
call UnitApplyTimedLife(GetLastCreatedUnit(), 'BTLF', 3.83)
endfunction
I know it is messy - please help me fix it! Thanks!