Endless Runner help

Get help using Construct 2

Post » Mon Dec 30, 2013 1:37 am

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?
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Mon Dec 30, 2013 3:15 am

@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
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Mon Dec 30, 2013 5:28 pm

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?
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Mon Dec 30, 2013 6:26 pm

It's a system condition. system trigger once.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 30, 2013 8:09 pm

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.
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Mon Dec 30, 2013 11:26 pm

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?
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Tue Dec 31, 2013 12:52 am

Loom up squidsters gravity based rotating platformer example
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Tue Dec 31, 2013 1:50 am

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...
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Tue Dec 31, 2013 2:04 am

If anybody can help me, as of now, I think I tried every way possible :(
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Tue Dec 31, 2013 10:05 am

Im sarting to realize it isnt possible...
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 7 guests