Bug or novice question

For questions about using Classic.

Post » Mon Jan 03, 2011 11:02 pm

I've been experimenting quite a bit with Construct. My latest project is going to be a car game.

link: http://www.mediafire.com/?ma1hw1tss4taoil

I've tried to add a sprite to be the lights from the car. (You'll see it when you open the .cap). The problem is, I can't get the lights to turn on/off with the same key. I've tried using variables, and other methods, but I can't get it.

What I want: The "L" key to turn the lights on when they're off, and off when they're on. It seems easy enough...

Also, I'm having trouble with the "light" sprite having the same angle as the car. Any help there would be appreciated also.

Thanks!
B
1
G
2
Posts: 2
Reputation: 629

Post » Tue Jan 04, 2011 1:03 am

I would really recommend looking at the tutorials if you haven't. Stuff like the Ghost Shooter tutorial, or the Platformer school addresses a lot of the problems you seem to be having, and if you really go through them (and multiple times! like I did), you should begin to get a grasp of what you're trying to do. You can't really just run into things or else you'll hit infinite roadblocks.



The problem you have is this:


on the specific action "L key pressed" you have nothing happening.

What you need is something like this

-L key is pressed
-Sprite2 Opacity Equal to 100

Then: Set Sprite2 Opacity to 0

-L key is pressed
-Sprite2 Opacity Equal to 0

Then: Set Sprite2 Opacity to 100


For the lights (you should really get into the habit of naming your sprites), you do this:

Always (every tick):
Set Sprite2 to Sprite image point "lights" (I made an image point where the lights go).



Like I said, do them tutorials.
Check out my VGM on my soundcloud page!
Video-Game Music: E.C.2151
B
7
S
2
G
2
Posts: 193
Reputation: 1,561

Post » Tue Jan 04, 2011 2:17 am

A handy tip for making toggling variables.

On key "L" pressed -set Car.value('Lights') to 1-Car.value('Lights')
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Wed Jan 05, 2011 1:19 am

Thanks for the help! I had already gone through some tutorials, and they were very helpful.

Here's what I finally got (just for reference):

http://www.mediafire.com/?48nzrt1f91a6z8b
B
1
G
2
Posts: 2
Reputation: 629


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests