Game Development Community

It's back! Ladders and ropes

by FruitBatInShades · in Technical Issues · 06/15/2004 (1:12 pm) · 5 replies

Any ideas about how to add a ladder or rope to torque? I'm guessing I'd need...

1. New ladder entity
2. New section of animation for climbing
3. Help from other people :)

Has anyone put any serious thought or tried coding this yet?

#1
06/16/2004 (10:22 am)
There are some resources to do ladders in Torque.
#2
06/16/2004 (12:44 pm)
I searched for ladders and the only thing I could find was using a stair which looks a little err.. bad!
#3
06/26/2004 (6:38 am)
datablock TriggerData(LadderData){
	tickPeriodMS = -1; //infinite
}

function LadderData::onEnterTrigger(%this,%trigger,%player){
	//modify Player Movement Physics Data to counter gravity
}

function LadderData::onTickTrigger(%this,%player){
	//move the player up or down based on control of direction
	if (player.moving){ 
		%player.playThread(0,"climb"); 
		alxPlay(AudioProfilePlayerClimb, x,y,z);
	}
}

function LadderData::onLeaveTrigger(%this,%trigger,%player){
	//restore Player gravity
}

Be warned, I'm fairly new to Torque Script. I believe using Triggers to be a logical approach.
#4
07/17/2004 (6:18 pm)
No help, i just use ramps like that stoire where nasa spent millions to make a pen for 0 g's the russans just used pencils see what im saying (i kant spall)!)
#5
08/01/2004 (12:36 pm)
I need help on elavtors. Got any code examples?