Script execution

If you triggeractioned a npc, passed it the parameter with the player’s id. Set that #p(0) to a level wide variable playerid=#p(0); in the triggeraction. And then had if(playerid==yourplayerid){ playerx+=1; } outside the triggeraction. Assuming I had variables for each player with their playerid number. Would the playerx only move the player with matching playerid, or move all players?

This may be a stupid question? But I just wanted to double check that player editing variables only affect who executed the script, even if they don’t carry the script.

*note: i’m 95% sure this is a stupid question, sorry in advance.
edit: What about changing setshape for only one player? possible without removing onwall check?

Well, playerid is a local variable. “Everyone is number one”, sortospeak.
And the local variable changes a lot depending on who is in the level, who leaves, who enters, who stays.

Setshape… I forget if it gets passed over to other players, I think it might.

Also are you trying to make it so the player triggers themselves? Or a specific player on the level? I’ll admit its a bit tricky, playerid isn’t a trusted variable and we cannot easily grab account names from other players for matching.

Ya, I think my only concern Is, that i’m pretty sure setshape is sent to all the players on a level, even if they didn’t execute the script. Hidelocal could be a replacement in functionality? then put a showimg of the npcimg in the same location. It would appear the same as changing the setshape to unblocking?

The idea is that a player triggers a npc, and that npc runs a script section only for the person that triggered it. I am using my own variable array for playerids tho luckly.

P.s. I’m trying to work out a wall running like prince of persia script. I’ll post it here along with other stuff i’ve been working on recently when it’s decent.