Author Topic: On number of players touch  (Read 610 times)

It would be nice to have an event that work on how many players activate or touch a brick. Example: make a max capacity on a bridge. If more than the number of players are touching it, it collapses.

We need OnPlayerStopTouch.

Kaphiterl:

OnPlayerTouch - Self - Setzone - Center - 10 0 0 0
OnPlayerLeaveZone -

You can do the onPlayerLeave using default events:

0     onPlayerTouch > cancelEvents
0     onPlayerTouch > setColor > red
400 onPlayerTouch > setColor > white

That'll make a brick red while you're on it, and white when you're not.

You could try doing some sort of print counter and when it overflows, it collapses the bridge. Maybe increase by 1 ontouch, and decrease 200ms after. Then you can adjust how high the counter goes to make sure there are X many people on it.
« Last Edit: August 29, 2009, 04:28:28 PM by Ephialtes »

onPlayerTouch only registers for one player object on a brick at a time, including bots. Standing on the same brick as a bot with onBotTouch or onPlayerTouch events will occasionally prevent them happening to one or the other until either the bot or you leave the brick.

Yeah i agree with Kalphiter : Whe need Onplayerstoptoucht, Needed!

When Ephialtes gave you the exact answer above?