LittleStain's Forum Posts

  • If you want to increase the chance turretbodyabove would be created you could just use:

    Choose(1,1,1,2,3)

    I would actually recommend using a function call with the choose as one of the parameters..

  • I prefere to make toggles like that:

    If you use that, why not just use:

    on left button clicked

    set Toggle = 1-Toggle

  • Many ways to do this..

    One way is to give the settings button an instance variable boolean "active"

    on settings clicked

    toggle boolean variable

    -- settings is boolean

    set sprites visible

    -- settings is not boolean

    set sprites invisible

    Also using an else statement could be used for this and many other things..

    If instead of setting visible you create and destroy the rest of the sprites, you could prevent the possibility of clicking them, instead of having to add extra conditions for that..

  • If I understand correctly you want to know if the sprite is overlapping on drop?

    If so just add a condition to the on drop event..

    sprite on drop

    sprite is overlapping sprite2

  • Yes but if i set "no" then i can launch the ball towards angle using Bullet Behaviour to calculate in what direction will be theball moving when is touched by the player.

    At least i tested in both ways and with the "property: no" i was not able to launch/move the ball towards some angle ¿?. I will test again with other options but i remember that not works correctly.

    Setting the angle has nothing to do with setting the angle of motion..

    To launch the ball at angle you should use ball set bullet angle of motion..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • in psuedo code it would be something like this:

    on space pressed

    -- if hide is true

    unhide

    -- else

    hide

  • > Are you using the default controls?

    >

    > Sharing a capx with the issue would probably make answering the question a lot easier..

    >

    Yes i have the defualt controls set to Yes. What is a capx?

    The file format in which Construct2 saves as a single file is a capx..

  • LittleStain You are awesome. It worked by removing the additional destroy action in the function. Thank you so much for the help.

    Glad to be of service..

    Good luck with creating your game(s)..

  • You'll have to explain better

    visually? - set opacity or use the fade behaviour

    completely? - object destroy / object create

    And could you please change the title of this topic to something more explanatory?

  • I thought so, but wasn't sure..

    In the function "onCollision" there is an action to destroy enemy bullet..

    This enemy bullet is not referenced so all enemy bullets are destroyed..

    The action doesn't seem nescessary and can be removed, removing your issue..

  • I'm not sure what you mean..

    An image point doesn't have an angle it's just a point..

    If you mean setting the origin of a sprite to another position so it rotates around that point, it's as simple as changing the position of the origin in the image editor..

  • I guess you could create all of those movements with the sine-behaviour..

  • Are you using the default controls?

    Sharing a capx with the issue would probably make answering the question a lot easier..

  • Well all you need is in that example, you only have to adjust the bits you don't like so you like them..

    I don't know how you've set things up so answering this would be pretty much guessing..

    Maybe an expression like clamp() could help, to create stuff like a maximum and minimum zoom and pan..

  • enemy bullet on collision with player should be enough to pick only the bullet that collides..

    Please explain what is not working..