Localised Arrow collisions

So this is what I’d consider a bug but I’m not 100% sure if it’s intended functionality or not. Hence there could be a server option to toggle this feature.

The idea is that at the moment, whenever a player shoots an arrow and hits an npc, all players are notified of the washit condition for each npc.
Example:
Whenever an npc is hit by an arrow, a player’s chat will be set to “I hit it”.
We expect if there are two players in the level, A and B, only A’s chat will be set. This is not the case, and both player A and B will say “I hit it”.

My proposal is that, when the localised npc hits is toggled on, arrows shot from player A will only trigger such events clientside, and will not be shared amongst players.
A potential problem arising from this however is when we want an npc to shoot an arrow and for the event to be reflected on all clients, thus we must make an assumption that arrows shot from an npc weapon are owned by players(event will be localised), and arrows by an npc are ownerless(event will be reflected on all clients regardless of toggled option).

Does it trigger for both players if you use shoot?

I believe so, the only way to get around the problem is if you setup custom projectiles such that the account shooting was sent as a parameter then acting only if the current account matches that of the parameter, which while most likely being less work in the long run, is just adding to the forever accumulating hacks it takes to make a playable server…

Does the variable ‘actionplayer’ not show as the player who shot the arrow?

Can you give an example of how that’s accessed in GS1?

actionplayer gives the id of the player that triggered the action

[quote=newfeatures2002.txt]- variable actionplayer should work better now (giving the index
of the player who has triggered the ‘triggeraction’ event)[/quote]

This is what I assumed, though I’m not sure whether it’s just for triggeraction or all default events.

With this thread being made I also assumed that the documented events ‘shotbyplayer’ and ‘shotbybaddy’ must be unreliable.

I doubt that “actionplayer” works for built-in shit. This isn’t a serverside change either, it would have to be assembled into the client.

Doesn’t the event need to be relayed via the server when the arrow hits? Or is an arrow once shot added to each client and tracked independently?

Since all clients can see the arrow I would assume the client takes care of it instead of the server. You could add a client flag “Ishotthearrow” and use that in the logic, but that’s kinda bleh. You would also need to keep track of the players x y coordinates to calculate positive collision vectors so multiple arrows from multiple clients don’t get mixed. Its all bleh. Don’t do this Lol. Bad idea. Sorry.

Pre-NPC server, the clients handle most things (including this) independently. The game was mostly clientside with trust being placed on the clients by the server. This is why cheating was so easy and prevalent.

So really, this is unable to be fixed via a gserver modification?

It’d be easier to just make your own projectiles.

Correct! In terms of the built-in projectiles, at least.