- Joined
- Jul 22, 2008
- Messages
- 67
I have almost no clue how JASS works and I would like to modify a trigger but don't know proper operations and/or functions to do it. I would like to make the
separated text into a glide, where movement is still possible but falling is still slowed. I am working on a Combat Zone mod and can post any additional code or the map if nessecary.
JASS:
function Trig_Parachute_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A007'
endfunction
function Trig_Parachute_Actions takes nothing returns nothing
local integer PlayerId = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local integer ObjId = udg_playerControlledObj[PlayerId]
local unit Obj = udg_objUnit[ObjId]
local real Scale
if udg_objZ[ObjId]-GetEnvironmentHeight(udg_objX[ObjId],udg_objY[ObjId],udg_classCollision[udg_objClass[ObjId]]+1,0)>0 then
if udg_objParachute[ObjId]==null then
[change section] set udg_objParachute[ObjId] = CreateUnit(Player(PlayerId),'h008',GetUnitX(Obj),GetUnitY(Obj),GetUnitFacing(Obj))
set Scale = udg_classCollision[udg_objClass[ObjId]]/145+0.22
call SetUnitScale(udg_objParachute[ObjId],Scale,Scale,Scale)
call SetUnitUserData(udg_objParachute[ObjId],-1)
set udg_objParachuteEffect[ObjId] = AddSpecialEffectTarget("parachute.mdx",udg_objParachute[ObjId],"origin")
call ShowUnit(udg_objParachute[ObjId],false)
call AdjustParachute(ObjId,true)
call ShowUnit(udg_objParachute[ObjId],true)[end change section]
endif
else
set udg_objSpeedZ[ObjId] = 8.8
endif
endfunction