gun help

K

Kirpy

Guest
ok so i have multiple guns that i would like to respawn every once and a while. My main point is how would i make it so when i collide with one anything the player is holding will get destroyed and will keep the new one.
I can provide code if needed. Thanks in advanced.
 

TheouAegis

Member
Store the ID of the active gun that the player is using in the player instance. When the player picks up a new gun, then you can easily destroy the old one by referencing that variable holding its ID.

instance_destroy(obj_player.equipped_gun);

Then assign the new gun's ID to the player.
 
Top