I am making a small puzzle based game. I want the number of instances of an object to be equal to the ammo count plus 2.
Each time a new room is loaded, the main object's creation method with run this script:
var ammo = instance_count(jellyfish)+2;
Then each time a bullet is fired, I subtract one. When there is no ammo left, the player goes to the 'failure' room.
However, I get the error: Unknown function or script: instance_count
.
I have see this script on Google, but am not sure if it has deprecated or not. Is there a way I can do this?