• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help with a JASS trigger

Status
Not open for further replies.
Level 4
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
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
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.
 
Level 4
Joined
Jul 22, 2008
Messages
67
It might help to just post the map, all this is kinda alien to me. My goal is to change the parachute function of slow falling (which also disables movement, which can only be done with the arrowkeys) into a gliding function, with either arrowkey steering or just foreward movement. Sorry if i'm being vague, i'm pretty confused by all of this. I'll post the map or some code sections in an edit later.
 
Status
Not open for further replies.
Top