T
TTJ
Guest
Hi,
I was wondering how you guys are handling item pickups since i believe my method could use improvement.
Usually i create multiple player variables inside the item. For example item Shield has player1= false and player2 = false. Then in the collisionevent with the parent of the players it checks which player it is and turns the false to true. And so when player1=true, the shield follows player1.
But there has to be a better way. I use the same method tracking which bullet belongs to whom so the player doens't die by its own bullet. (bullet = instance_create, bullet.player1 = true, etc)
Greetings!
I was wondering how you guys are handling item pickups since i believe my method could use improvement.
Usually i create multiple player variables inside the item. For example item Shield has player1= false and player2 = false. Then in the collisionevent with the parent of the players it checks which player it is and turns the false to true. And so when player1=true, the shield follows player1.
But there has to be a better way. I use the same method tracking which bullet belongs to whom so the player doens't die by its own bullet. (bullet = instance_create, bullet.player1 = true, etc)
Greetings!