notalkingplz's Forum Posts

  • this is what i currently have and it's obviously wrong

  • in events, system, compare the score's variable. variable = 5000. in the actions, create object on the layer at the point that you want it to be at.

    for the second thing you do, it's the same thing as the first but instead of = 5000, it would be = 123456 and instead of creating a sprite, it will create a button on the game over screen. in the actions, you want to add set time scale to 0 (it basically pauses the game) and destroy the retry button. for the events of the continue button, when the button is clicked, set time scale to 1 (resumes the game) and set it so it goes back to the game. set another action to create a new retry button on the game over screen layer/layout. make sure every time the game starts that the retry button is recreated or it might not appear in your game after it is destroyed for the continue button.

    i hope my instructions helped. it might not be the most efficient way but logically it works

  • Spawn_count = Spawn_count + 1

    if Spawn_count = 5

    -- spawn object,

    -- set Spawn_count = 0

    or

    If object.count not= int(number / 5) then spawn object

    didn't really understand that but it gave me an idea which works.

    my character on collision with an item, adds 1 to the variable

    if the variable = 5, enemy spawn and set the variable back to 0

    edit: ... i just realized that that's what you meant :S silly me

    thanks for the help!

  • notalkingplz That's not what I meant.

    I need to show a message when the player tried to leave the game (go back to android home screen) not the gameplay (the actual play).

    For example, when you are playing Candy crush and you try to leave the game( go back to android home screen), you will get a message asking if you want to leave or stay. That's what I need.

    ahh i see what you mean. i have no idea how to do that. i hope someone can answer your question

  • mind you, i've only recently started learning construct 2 so i might not be 100% correct or efficient. there should be multiple ways of doing this.

    1. create a new layout

    2. if you don't have an exit button on the layout of the game, add one

    3. in events, set the exit button when clicked, set to the new layout that you just created and also add an event that sets the time scale to 0 (this basically means that the game is paused)

    4. on that new layout, put your "are you sure you want to leave" message there

    5. create 2 buttons on the layout, one for leaving the game and one for resuming the game

    6. for the events, you want to set the 'leave button' when clicked, set to the layout where you want the player to go to

    7. set the 'resume button' when clicked, set to the layout where the game is and add an event that sets the time scale to 1 (this event resumes the paused game)

    sorry for my really bad instructions :S hope it helps

  • how can i make it so that every time my variable for the score is increased by 5, the game spawns another enemy?

    don't know how to do it without having to compare it with every number that is divisible by 5

  • I think this should do it. Please excuse the sprites...

    This does not use the on collision check because I'm not sure that it would work all the time (I could be wrong). Here you go for my solution:

    awesome =] thanks for the reply. can you explain to me what happens?

  • Don't use the "Spawn another Object" method. Instead use "System" - "Create Object" and enter the X ,Y coordinates you want it to show up at.

    If you want to use spawn you could always give the first sprite multiple image points outside its actual graphic and choose one of these to spawn on.

    i made an edit to my post to clarify the situation a bit more. sorry about that :S

  • as the title says, how do i make it so that when an object spawns, it doesn't spawn on top of another object?

    edit: just to clarify, in my game, whenever the character sprite comes in contact with the object item that it collects, the item's position is set to another area randomly (basically kinda like the game snake). i want to make it so that when the item randomly spawns, it doesn't spawn on top of the character sprite because the collision polygons don't collide and there's this awkward moment where you have to move the character off the item and then collide it with the item again to collect it.

  • maybe you double click on sprite and choose set collision polygon ?

    i found a behaviour plugin that made it much easier to do. thanks though =]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • what is the best way to create a solid border that is impassable by objects? i've tried adding the solid behaviour to sprites to act as a border but it's not working at all. (in the event sheet i put in "every tick: object solid enabled")