LittleStain's Forum Posts

  • I have no clue what you mean..

    Why should you destroy an animation?

    Do you mean:

    player on collision with gun

    player set animation to player_gun

    You can set animation from current frame instead of beginning if the frames of the animations are the same.

    If the animations are different you could first check the current animationframe and set the frame of the new animation to the corresponding one..

  • What do you mean by skip collision?

    or

    What do you want to happen and what happens at the moment?

  • i figured that the compare value was basically "Every tick" and any time the player position value changed it would update the comparison with each object..

    I guess this is actually true..

    But you are not telling C2 which object you want to affect when the condition is true..

    The system compare action just compares the values..

  • Adding a "for each enemy" top level event would be enough..

    Instead of system compare you could also do an enemy compare variable action..

  • Number one rule in creating events:

    Events work by filtering specific instances that meet some conditions. The actions then run for those instances only.

    https://www.scirra.com/manual/75/how-events-work

    You are not referencing any objects in your event, so all objects are affected..

  • It is actually pretty simple..

    On creation of the object - give it an instance variable from 1 to 5 to decide on which lane it is

    Give the player an instance variable to decide on which lane He is..

    For each object

    -- system compare player.lane<object.lane

    object send to top of layer

    -- else

    -- object send to bottom of layer

    player on collision with object

    system compare player.lane=object.lane

    player die horribly

    or if you want to only set it on collision

    player on collision with object

    ---system compare player.lane=object.lane

    player die horribly

    --- else

    ---system compare player.lane<object.lane

    object send to top of layer

    --- else

    object send to bottom of layer

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so:

    Mouse on object SpriteA clicked - audio play = "A"

    The other way around you could set a global variable "Letter" to choose("A","B","C", etcetera)

    On pressed button play - audio play = global variable "Letter"

    On spriteA clicked

    system compare global variable "Letter" = "A"

    set text to: "Congratulations!"

    I hope that with this explanation you can get started.

  • so if I understand correctly the player moves between layers..

    The objects are on these layers

    As far as I know:

    If you want the object on the layer to be in front of the player you could use z-order move to top and behind, z-order move to bottom

    Probably once the player is send to the layer, the player will be on the top, so you might need to sent the player to the back if needed.

    On created - a sprite will allways be created on the top, so it should be sent to bottom if you want it to be behind the player

  • I think we need a bit more information, before any usefull answers can be given.

    Could you explain what it is you want the game to be like?

  • well, your example is pretty strange..

    I can't get the explosion to work one simple time..

    After changing it a bit, it works perfectly though:

    https://dl.dropboxusercontent.com/u/485 ... osion.capx

  • Add subevents

    When key S

    -- player animation player_gun is playing

    set animation to Player_crouch_gun

    --else

    set animation to Player_crouch

    It might be even easier to give the player a boolean variable HoldingGun and check if that's true, especially if you are going to add more animations.

    If I have to guess the second question has to do with your collision-polygon and maybe origin-point..

    Check these or have the player's movement controlled by a square sprite with the animations pinned to it..

  • Add the condition is overlapping

    Mouse on left button clicked

    mouse is overlapping cookie

    create object

    Or

    mouse on object clicked cookie

    create object

  • This depends a lot on what you'd like, but I guess giving the ball something like bullet-behaviour, and player on collision with ball ball set speed and ball set angle should work..

  • Really strange. All I had to do was type split screen in the search and I found this topic..?