mutual exclusion

anyone experiment with this in graal yet? i was thinking about making a baddy npc that all players will be able to see at the same time. thinking about keeping the npc’s stats as server flags. though i cant have all clients trying to edit server flags at the same time.

Have one player control the movement.
if(isleader) {}

You could have other players control the attack if you want, eg “NPC is near me, it beats the shit out of me”. I have lil invincible baddies in cs_grasstown.nw in Bomber in the CaveStory knock off, I use a different method for controlling them.

Instead of the leader controlling their actions, I have the closest player controlling their actions, when the controlling player says they are no longer the closest they hand it off to someone else to function.

[QUOTE=Beholder;56071]
Have one player control the movement.
if(isleader) {}

You could have other players control the attack if you want, eg “NPC is near me, it beats the shit out of me”. I have lil invincible baddies in cs_grasstown.nw in Bomber in the CaveStory knock off, I use a different method for controlling them.

Instead of the leader controlling their actions, I have the closest player controlling their actions, when the controlling player says they are no longer the closest they hand it off to someone else to function.
[/QUOTE]

cool. how does isleader handle people who disconnect from the server or just suddenly change level?

It’s governed by the GServer and a bit is sent to a player once they are deemed “first in level”. All loops are traditionally suspended (unable to loop) until a player is the leader (unless timereverywhere; is called within it’s script).

If a player leaves or dies, they are bumped to the back of the line, if a leader pauses, well, their portion of the script will be paused.

Maybe that’s why Zodiac had no Pause?

[QUOTE=Yenairo;56139]Maybe that’s why Zodiac had no Pause?[/QUOTE]
Bingo, and thats why they jailed anyone in a party for causing their client to lock up.