Making bullets only damage other players

Posted by IvanFon
I used the code from the getting started and synchronizing instances tutorials. The bullets show up on other clients and everything. Now, I'm wondering how to make it so the bullets only damage other players. I don't necessarily need all the exact code, just a basic idea to push me in the right direction would help.

Thanks!

Replies (1)

Last message on 1 Aug 2016

Size43 (Administrator) on 1 Aug 2016, 20:54:53
Before applying damage, check the owner variable (auto-created after calling gms_instance_sync). If that variable does not equal gms_self_playerid(), the instance was made by someone else.