2 issues I'm having...(capx attached)

Get help using Construct 2

Post » Thu Apr 06, 2017 6:00 pm

Hi all!
I'm currently having a go at making a platformer type game and have run into 2 issues I just can't seem to fix.

1) I've got a "column of fire" type object that I want to turn on and off at different intervals (duration and pause times are stored in instance variables). I've set it up with 2 animations: the default one is it's off state and one called "Fire" is a 2 frame animation for when it is activated. I'm trying to get it to activate when it comes on screen and cycle between it's off and on state (so the player has to time his jump to get over it). I don't think I'm approaching this the right way.

2) I have a boulder type object which I want to start rolling when it comes on screen. I've given it the 'Platform' type behavior because I want it to fall when it gets to the end of a platform. It works ok when there is only one on screen but if another comes on screen the first one stops until the second one is destoyed then the first carries on. Not sure why its doing that!

Here's the capx if someone could take a look and tell me where I'm going wrong :)
https://drive.google.com/file/d/0BwoaeB ... sp=sharing
(Move with the arrow keys, "Z" to jump)

Thanks!
B
5
Posts: 13
Reputation: 726

Post » Thu Apr 06, 2017 10:05 pm

https://www.dropbox.com/s/i90e710z3e6x5tp/TestProject.capx?dl=0

Take a look at the changes I made to your sample project. The flame column has a new local variable to record the last time its state changed. The "Else" event was what was causing a couple of the issues you saw. I replaced it with specific events. Be careful with the else statement. It's not always the best way to do things.
B
39
S
12
G
11
Posts: 331
Reputation: 7,727

Post » Sat Apr 08, 2017 11:38 am

Awesome, thanks you very much!!
B
5
Posts: 13
Reputation: 726


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, kiki4construct and 26 guests