Kiloku's Recent Forum Activity

  • I have a sprite with Platform behavior, which has to throw grenades at the cursor whenever the player presses the mouse button. I made the grenade's movement by using

    Apply Physics force 30 toward (Mouse.X, Mouse.Y) at image point 0

    Thing is, this only works well if the Sprite is not moving. When it's walking around, he moves faster than the grenade, which makes it too hard to aim...

  • I need this for an explosion. Once the explosion is spawned, I should do some operation (like change the HP) on all objects within 100 pixels of it.

  • Doesn't work because it ends up decelerating... Also, sorry for the confusion I probably caused, but I meant 8-Direction. The player is the car, actually...

  • A sprite with Car Behavior which moves without player control.

  • I tried making an NPC with a Car Behavior, but couldn't make it accelerate. If I use "Set Acceleration", it just doesn't accelerate, and if I try "Set Speed", it just goes straight to that speed without accelerating...

    System: Always (every tick)
    

    NPC Set angle towards Sprite 0

    NPC Set 8-dir angle of motion to Sprite3.Angle

    NPC Set speed to 350

    [/code:2xlrq7ku]

  • I'm not sure what events exactly you used, but I assume you made it add when the player collides with the coin. Try the inverse, add 1 to the private variable when the coin collides with the player...

    Example:

    On collision between Coin and Player
    

    Player Add 1 to 'Coins'

    [/code:2fnofxk2]

    Instead of

    On collision between Player and Coin
    

    Player Add 1 to 'Coins'

    [/code:2fnofxk2]

  • MouseKeyboard: 14 On Left Clicked on Sprite 0 
    

    Dragon Set 'Moving to Attack' to 0

    Destination Make Visible

    Destination Set position to Minimap 0 .MapToLayoutX(MouseX-Sprite 1 .Left-ScrollXLeft), Minimap 2 .MapToLayoutY(MouseY-Sprite 3 .Top-ScrollYTop)[/code:zr4kv2g1]

    This accounts for scrolling, works fine The "Sprite" is a sprite with the same dimensions as the minimap. For some reason the box didn't work with me...

  • Your example doesn't open, something about an abnormal program termination, but I think I understand what you mean, I'll try it.

  • MouseKeyboard: 14 On Left Clicked on Minimap 0 
    

    Destination Make Visible

    Destination Set position to Minimap 0 .MapToLayoutX(MouseX-Minimap 1 .X), Minimap 2 .MapToLayoutY(MouseY-Minimap 3 .Y)

    Destination Flash for 0.5 seconds with 0.1 seconds interval

    [/code:gr63svrl]

    I tried that, and it still doesn't work...

  • MouseKeyboard: 14 On Left Clicked on Minimap 0 
    

    Destination Make Visible

    Destination Set position to Minimap 0 .MapToLayoutX(MouseX), Minimap 2 .MapToLayoutY(MouseY)

    [/code:1ecz8zif]

    That's what I tried...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to make an object appear on the layout, based on where I clicked on the map. I tried using the MaptoLayout, but didn't manage to make it work

  • Thanks a lot, Arcticus! It worked!

Kiloku's avatar

Kiloku

Member since 2 Mar, 2010

None one is following Kiloku yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies