Okay this is making me sort of mad trying to figure this out......In the game I am making I created a special function called "death" that should subtract one life off of the inventory. I go to try it out and it for some odd reason subtracts two lives instead of one. So i tried setting up a collision for the enemy sprites so that as soon as I run out of health it restarts the player sprite and subtracts a life.....and guess what happened it subtracted two instead of one. I have spent quite a few hours trying to figure out what's wrong and I can't seem to find it. it would really be appreciated if someone could possibly give me an idea what is wrong.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If this is a special function that activates on a sprite collision, make sure that the collision isn't also subtracting a life. Also, make sure that you have the special function set to change it by "-1" and not anything else. Also, make sure you aren't activating the function twice (for example, if you are activating it by way of an "Activate Series of special functions" and it is in the list twice)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay i found out what the problem is. I have the map interaction spikes so as soon as the player sprite touches this tile it is teleported back to the beginning of the level. The problem is that I also have a map interaction that as soon as the sprite touches the spikes it subtracts a life. But i have a bunch of these tiles togehter so what happens is the sprite touches two tiles at the same time and subtracts two lives instead of one does anyone know how i can fix this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you instead have one Special function that activates on each touch that activates two other special functions (activate a series of special functions) that would first teleport then subtract a life, that would work better I think.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
*Pondering* ... Can you have an inventory item called "SingleEffect" with max count = 1. Make a global function that always adds 1 to the SingleEffect inventory. Then have the tile interaction use up a "SingleEffect" to activate. The tile interaction could trigger a special function that performs the changes you want (subtract life and go to the beginning). This ensures that the tile interaction can only trigger once per frame even if you are touching multiple tiles. It would also allow you to continue using tile interactions without having to put special functions over every area of spikes that you have.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay this is making me sort of mad trying to figure this out......In the game I am making I created a special function called "death" that should subtract one life off of the inventory. I go to try it out and it for some odd reason subtracts two lives instead of one. So i tried setting up a collision for the enemy sprites so that as soon as I run out of health it restarts the player sprite and subtracts a life.....and guess what happened it subtracted two instead of one. I have spent quite a few hours trying to figure out what's wrong and I can't seem to find it. it would really be appreciated if someone could possibly give me an idea what is wrong.
Thanks
If this is a special function that activates on a sprite collision, make sure that the collision isn't also subtracting a life. Also, make sure that you have the special function set to change it by "-1" and not anything else. Also, make sure you aren't activating the function twice (for example, if you are activating it by way of an "Activate Series of special functions" and it is in the list twice)
Okay i found out what the problem is. I have the map interaction spikes so as soon as the player sprite touches this tile it is teleported back to the beginning of the level. The problem is that I also have a map interaction that as soon as the sprite touches the spikes it subtracts a life. But i have a bunch of these tiles togehter so what happens is the sprite touches two tiles at the same time and subtracts two lives instead of one does anyone know how i can fix this?
If you instead have one Special function that activates on each touch that activates two other special functions (activate a series of special functions) that would first teleport then subtract a life, that would work better I think.
*Pondering* ... Can you have an inventory item called "SingleEffect" with max count = 1. Make a global function that always adds 1 to the SingleEffect inventory. Then have the tile interaction use up a "SingleEffect" to activate. The tile interaction could trigger a special function that performs the changes you want (subtract life and go to the beginning). This ensures that the tile interaction can only trigger once per frame even if you are touching multiple tiles. It would also allow you to continue using tile interactions without having to put special functions over every area of spikes that you have.
sonic
pokemon