I have it so that when actor collides with the watermelon it changes attribute game.watermelon hitpoint to watermelon hitpoint +1. When attribute game.watermelon hitpoint=1, change image. I also have it so when the ant collides with the watermelon, it destroys the ant. But this is what happens.
Comments
at first i thought it was a bug or something but it actually is how the actors are placed on screen that made this happen. make sure you have all the spawners stacked together in the scene section next to "games" where the actors are. just drag them and place them over the watermelon and have the background under them all. hope that helps
cheers!
look at the 2nd last post in that thread
Note: The url of image must be located on the web somewhere. Not just on your computer.
-Images need to have a URL. Use picasa, flicker, photobucket... what ever as long as you can get its URL
Then just paste the code.
#img src="IMAGE URL GOES HERE" /$
Replace the # with < and $ with >
Example:
As for the water melon, you can use TBS's video on custom font. But instead of showing numbers you can show water melon health.
*To post videos just use the URL
So for the water melon make 2 self attributes health & div
-Rule: actor overlap colides with actor with tag "bug"
Change: Health to health - 1
Then use TSB's constrain attribute
I hope I don't send you spiraling down hill...
Michael
Please note: Take everything I say with caution, there are usually better ways to do things. I always just go with the 1st thing that pops into my head.
You might have a loop set up so its health goes from 10 to 0 instead of 10 to 9
Also I would recommend Change Atribute: self.image to watermelon2.png instead of change image.
Only because you are going to be loading ALOT of images it seems, and this will cut loading times down. GS recommends against this only because when they fix the loading issue, but until then this is the best way, and can easily be fixed when the update comes.
You logic makes sense I don't under stand why this is happening. Are you sure that it is happening? Any way attributes are firing multiple times?
Be warned that the ant actors are small, and I recommend testing on a device. It might be quite hard touching them.
One thing you could try is that instead of spawning/destroying the ant, you could just recycle the ant actor by moving it back to its starting position when it touches the watermelon. Perhaps this action will be faster than the destroying behavior and the watermelon will be properly eaten.
Another thing you could try is deleting the ant actor in the scene and dragging in a new instance of it from the prototype. I have encountered issues in the past where I would be creating new instances of actors already in the scene via option-dragging and they would start acting all wonky. I discovered that dragging a new instance of the actor from the prototype instead of from another instance performed correctly.
Anyway, that's some things to try. Good luck with the problem!
- Jeff
I've been working with all kinds of software long enough to have seen workarounds for bugs that are more like voodoo than they are about logic and reason.
- Jeff
- Jeff
yup i had the same problem with my apple. be sure to have all the spawning actor in the same layer.
lets say i have this in my scene:
antSpawner
antSpawner
antSpawner
waterMelon
chocolate
antSpawner < wrong!
chocolate
Background
the wrong is were the mistake is you need too put this one under the other antSpawners
tell me if this helps
cheers!