Blanco 0 Posted May 12, 2004 Hello, I'm trying to make an obstacle course. The course got ramps,ladders,walkways,... To make sure the player can't cheat I've placed checkpoints with very small detection triggers and update a variable each time he runs through that trigger Something like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;1th checkpint WEST detect, ONCE Condition : Player in thislist && Cpoint == 0 On activation : Cpoint = Cpoint + 1 ;2th checkpoint WEST detect, ONCE Condition : Player in thislist && Cpoint == 1 On activation : Cpoint = Cpoint + 1 ;3th checkpoint WEST detect, ONCE Condition : Player in thislist && Cpoint == 2 On activation : Cpoint = Cpoint + 1 and so on and on, there only one round. The triggers on the ground work very well, But how I can I detect a player on a ladder or on a walkway? I thought (getpos player select 2) should work, but it always returns values around zero, while I'm running on walkway 3 meters high. So I've created a gamelogic that follows the position of the player in a loop and I check the height of the logic... No succes, same result. How can fix this? Share this post Link to post Share on other sites
General Barron 0 Posted May 12, 2004 Yeah, whenever a player is ontop of an object (building, bridge, etc), getpos player select 2 will return around 0. I've been frustrated with this since if you try to setpos something next to the player, it will go on the ground, not on the building/etc. But there is an easy way to fix this: create a game logic (I'll call it "logic") logic setpos getpos player This will setpos the logic on the ground directly beneath the player. logic distance player This will now return how high off the ground the player is. Hope that got it! Share this post Link to post Share on other sites
MrZig 0 Posted May 12, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getpos player select 2 >2 Should work? Edit:Oh I see your problem, the first reply should fix it. Share this post Link to post Share on other sites
Blanco 0 Posted May 12, 2004 Yes, yes I was thinking about the same workaround, but I couldn't test it yet. Thx a lot, General! Share this post Link to post Share on other sites