(Solved) FireBullet Extension but for multiplayer?

Hi everyone!

I’m trying to use the FireBullet extension for a 2 players game, but I can’t seem to distinct the bullets into different IDs so it’ll know which player fired which bullet…

This is what I’ve done:
I have 2 guns, each with a different player_id (1 & 2)
Each gun can fire bullets using the extension

I’ve tried creating an object variable with player_id on the bullet object, and changing it straight away after a bullet has been fired, but instead it changes all bullets on the screen at once, not the one that has been fired by the particular gun.

Anyone ever tried this extension with multiple players?

Thanks in advance!

Can we see the fire events? Maybe fire a different bullet object based on the ID of who fired it.

My only other idea without seeing any events is to add a subevent to the fire event and use the pick nearest object to pick the nearest bullet using the bullet’s creation x,y. And then add an ID or create a link.

Bullets don’t seem to auto pick like when you add regular objects.

1 Like

Sorry for the late reply! After much experiment, I’ve decided to fire a different bullet object based on the player ID like you suggested and it’s now working! I didn’t go for pick nearest object just in case the firing distance are too close if players are near each other and things could get messy.

Thanks again.

1 Like

That would definitely be more reliable. IDK how close the players got to each other.

1 Like