Page 3 of 7

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 1:37 am
by Frostolo
Im trying to figure out how to make this. The character is always hungry and need to keep eating stuff to maintain its health, otherwise it will deplete over time.

Made a variable called health
set health to 5
each time player hits an enemy adds +1 to health
after every 20 seconds subtracts 1 to health
if health = 0 reset game

But it doesnt work. Any help please?

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 3:15 am
by GameThirsty
@Frostolo

I assume you are using the "Is overlapping" logic when the player hits an enemy.

Whenever the player hits an enemy, and adds 1 to health, every tick it will add 1 to health if you have not added a condition to the logic. So the player could be hitting the enemy for 10 ticks before it is done hitting the enemy, causing the health value to be higher than intentionally calculating.

You should add "Trigger once while true" in order to stop this from occurring inside your games logic.

Or, you could always use the more simple route:

Player -> On collision -> Enemy -> Subtract 1 from Health

The above only fires once when true.

You could create a text object, and set the text to your current health value (if you had not done so already), it is great for debugging practices.GameThirsty2013-12-30 03:35:14

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 5:28 pm
by Frostolo
Sorry for the late responde. I made it thanks a lot. I always tend to use Collide since it was the only thing in GameSalad. Now I will start more often with the overlap.

One thing I dont know is the location of "Trigger once while true". Looked everywhere but I cant find. Where is that?

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 6:26 pm
by LittleStain
It's a system condition. system trigger once.

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 8:09 pm
by Frostolo
Ok Finally thanks a lot. Shameful, but I didnt found it. I have another question though:

How can I make an object rotate around another object? Like a fly rotating around a planet in a clock-wise rotation? Seems way to hard for me.

Re: Endless Runner help

PostPosted: Mon Dec 30, 2013 11:26 pm
by Frostolo
Still trying to rotate a character around a planet (like its moving on the surface) but I cant do it... tried with rotate (but its spin more like rotate), with bullet, with rotate around angle,,, but nothing. Any help please?

Re: Endless Runner help

PostPosted: Tue Dec 31, 2013 12:52 am
by BluePhaze
Loom up squidsters gravity based rotating platformer example

Re: Endless Runner help

PostPosted: Tue Dec 31, 2013 1:50 am
by Frostolo
I know that tutorial, I translated it to Spanish :)

But doesnt show what I want, how to rotate a sprite around another sprite. Been trying without luck, its driving me mad...

Re: Endless Runner help

PostPosted: Tue Dec 31, 2013 2:04 am
by Frostolo
If anybody can help me, as of now, I think I tried every way possible :(

Re: Endless Runner help

PostPosted: Tue Dec 31, 2013 10:05 am
by Frostolo
Im sarting to realize it isnt possible...