Immobilising Player ?
by Yin Yi Jia · in Technical Issues · 12/10/2005 (1:09 pm) · 2 replies
Hello,
I was wondering whether anyone knows whether this is possible -
At certain points in my game I wish the player to be immobilised or frozen where he cannot move until a certain period of time has elapsed. The timing will be triggered using the schedule() function.
So basically when the player goes through a certain triggered area, he cannot move until, say, 5 seconds pass when the schedule() function triggers another function to mobilise that player again so he is free to move again.
If anyone has any ideas on how this could be achieved I would be most grateful.
Cheers
I was wondering whether anyone knows whether this is possible -
At certain points in my game I wish the player to be immobilised or frozen where he cannot move until a certain period of time has elapsed. The timing will be triggered using the schedule() function.
So basically when the player goes through a certain triggered area, he cannot move until, say, 5 seconds pass when the schedule() function triggers another function to mobilise that player again so he is free to move again.
If anyone has any ideas on how this could be achieved I would be most grateful.
Cheers
#2
Many thanks for your ideas. I haven't got a chance yet to see if your solution works but it looks good to me. I will let you know how I get on!
12/12/2005 (5:45 am)
Hi Master Treb,Many thanks for your ideas. I haven't got a chance yet to see if your solution works but it looks good to me. I will let you know how I get on!
Torque Owner Dracola
but... you could maybe do
fo to default.bind
WARNING this code is off the top of my head I have no Idea if it works and some things may have to be tweeked
find the function that moves you forward I forget its name so I'l make one up
function moveforward(%val){
if(%val)
if(!$paralyzed)
moveforward();
}
do the same for moving sideways and stuff than in your trigger
trigger::onenter(%obj){
$paralyzed = 1;
%obj.setvelocity(0 0 0);
schedule(5000,"unparalyze");
}
function unparalyze(){
$paralyzed = 0;
}
}
I can't validate this right now but if you're haveing problems I can fix it or do some C++