Bug or novice question

This forum is currently in read-only mode.
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • 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!

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • A handy tip for making toggling variables.

    On key "L" pressed -set Car.value('Lights') to 1-Car.value('Lights')

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)