Author Topic: onPlayerTouch that accounts for all players touching?  (Read 2045 times)

I am having an issue with playertouch events where when multiple people are standing on the same brick, only one of them will interact with the onPlayerTouch events on the brick. Is there a way this could be fixed, or supplemented with a new playertouch event that counts all players standing on it?

Why: I am trying to develop a Turbolift system for my Star Trek ship that has a seamless transition between locales on Turbolifts, using doPlayerTeleport triggered by onPlayerTouch, intertwined with VCE.

you could try using 1x1 or 2x2 plates, to make sure everybody is standing on a different brick
or use zones to trigger the event (set the zone, instantly kill the zone, have onplayerenterzone>teleport)

Yeah, I tried using Zones at the suggestion of Conan, but every time someone else tries to use the teleport events on the turbolift, I get teleported instead, no matter what I am doing or where I am.

I can't use different plates, it has to all be through one brick in each turbolift.

Teleport events are so funky, it's very likely you're doing the correct thing and have everything set up right and the events are just acting up.

it's onplayertouch
it only targets one player at a time

and onInZone only targets the owner of the brick regardless of who is touching it

what about onenterzone?
that should target the players

Even if it were to work correctly, it would only work for up to 10 players. Your problem however sounds like an add-on conflict.

what about onenterzone?
that should target the players
but doesn't that only work if players are entering the zone?

I've always had that issue with onplayertouch
I know for sure I've stood on a killbrick (onplayertouch>player>kill) with a dwand, somebody else was on it and lived, then I jumped and he died
I don't think the dwand cancels the events completely, I think only on the player holding it


also back to teleporting,
when one player is teleported, why wouldn't the other players trigger it after the first leaves?
if you're toggling it off immediately, try giving it a delay

but doesn't that only work if players are entering the zone?
yes, which is why you create the zone, making them all enter it, then killing the zone, making it so nobody else can enter it

edit: do you have a server up? I could get on and try fiddling with concepts

also back to teleporting,
when one player is teleported, why wouldn't the other players trigger it after the first leaves?
if you're toggling it off immediately, try giving it a delay
because it's an immersion issue. the playertouch events are used to detect the player's current Turbostate variable, which is then acted upon accordingly.

Here is a picture of the events I am working with:


yes, which is why you create the zone, making them all enter it, then killing the zone, making it so nobody else can enter it
but they all have to be in the turbolift before it starts, therefore they have already entered the zone prior to the turbolift starting.

edit: do you have a server up? I could get on and try fiddling with concepts
yeah im hosting right now, come on down

I like to put everything within the frame of minigames, especially Slayer minigames, because they provide a great platform for event interaction.

I don't want to get into the states, but try something like this.

Code: [Select]
0.  0   onPlayerEnterZone  »  Self  »  VCEifValue   "<var:br:passengercount>"   [>=]   "1"   "1 1"
1.  0   onVariableTrue  »  Self  »  VCEmodVariable   "passengercount"   [Subtract]   "1"
2.  0   onPlayerEnterZone  »  Self  »  VCEifValue   "<var:br:passengercount>"   [<=]   "<var:mg:numLiving>"   "3 3"
3.  0   onVariableTrue  »  Self  »  VCEmodVariable   "passengercount"   [Add]   "1"
4.  0   onVariableFalse  »  Self  »  VCEifValue   "<var:br:passengercount>"   [==]   "<var:mg:numLiving>"   "5..."
5.  0   onVariableTrue  »  {whatever you want the lift to do}...

but they all have to be in the turbolift before it starts, therefore they have already entered the zone prior to the turbolift starting.
if the zone doesn't exist, they can't have already entered it

yeah im hosting right now, come on down
didn't see this for a bit, my bad

if the zone doesn't exist, they can't have already entered it
didn't see this for a bit, my bad
hm, ok. Will give this a try.

Hosting.

figured out how to do this with zonebricks and some loops
a bit complex for what the goal was, lol