MarkThomas's Forum Posts

  • Hi p0tayters,

    I know this is an old post, but I'm wondering how you got on with your game and the level editor? Did you get it working?

  • Once again I'm in your debt!

    Thank you

  • Hi,

    My first level is complete and I've made another layout for the 'home page'

    On the home page I have buttons that when touched will go to level 1, level 2 etc.

    I need everything on level 1 to restart from scratch when that level 1 button is pressed.

    It works fine the first time I press it, I play level 1 and when I win I go back to home page, this is perfect.

    But when I click the level 1 button again, I go to level 1 but the enemies I kill when I last played that level are gone (I have persist on them and need that to stay on them)

    I've tried using a global variable on the home page - if level1 button pressed subtract 1 from 'level1restarted'

    Then in level 1 - if 'level1restarted' equal 0 restart level (which it does but doesn't put the spirits back that I killed before)

    Basically how do I restart all the sprites back to their starting points?

    Thank you for taking the time to read this.

  • THANK YOU SO MUCH!!!! You're a life saver!!!!

    I had persist on the bad guys but didn't on the player, I've just added it and it works perfect.

    Never thought to check that! well done, thank you

    I'm happy now, thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I have 2 non playable bad sprites each with local variable (health points) = 2

    I have 1 playable sprite also with variable 'playerhealth)' = 2

    I subtract 1 each time a bullet hits them.

    When I reset (go to level 1) the game to allow the player to have bullets back the bad sprites have the correct health, eg: if they were shot before it restarted the level then they only have 1 health, this is perfect and what I want.

    But even if player gets hits and it deducts 1 from his health, when the game resets (go to level 1) he has 2 again!

    Everything seems identical to the bad sprites so I can't work out why the player returns with full health and they others are minus any hits.

    Bad sprites

    Playable player

    Could it be where they are positioned in the events, or sub events?

    Any ideas?

    Thanks

  • Oh right, ok thank you.

    Still learning it

    Thanks

  • I've managed to do it, I'll paste below what I've done in case someone else needs help.

    So many times I've seen people ask questions and then at the bottom of the page they write "Never mind I've done it" but they don't tell us what they done

  • Hi

    Thank you for your reply.

    I've just tried what you said, I not 100% sure if I did it right, here's what I done:

    1st I moved the 'On any touch end" out of the sub event making it not a sub event but it is still in the group, that didn't work.

    2nd I highlighted the 'On any touch end" and pressed CTRL + x which deleted only the wording, the events stayed there, I highlighted the 'group' (where the group name is) but it wouldn't allow me to press CTRL + v, so I highlighted just under the group (so the whole of the group lit up except the group name) I then CTRL + v, that pasted 'On any touch end" right about the touch green button part.

    This kinda worked and stopped me from firing the bomb while the first one was still active in the game.

    But it stopped the power bar going up which didn't allow the bomb to go at the speed that it would have for holding down the button for a time.

    Sorry if I've misunderstood what you've wrote.

    Thanks

  • Hi,

    I've got a green button that charges a power bar and when released a bomb is fired, the longer you hold the button the more power the bomb gets and goes faster.

    But if the player presses the button before the bomb is destroyed that bomb hangs in the air at the place it was when the button was pressed again and the same bomb is shot out again.

    Is there a way to disable the power button once it's been released until the first bomb is destroyed?

    So I can then shoot the 2nd bomb (3 bombs in total)

    I've tried:

    disable event and wait x seconds and enable

    Adding a variable and when = 0 wait (also tried disable event)

    They didn't work.

    Here's my code, any help would be great. Thank you

  • I agree, different layout for each 'part' of the land. Trying to do a huge map with just one layout will cause you to spend ages looking for things.

    The only problem I see is that the other player would also need to start that next layout at the same time as you start it, meaning you might need to auto end their game and transport them to the next level without them completing that layout.

    Good luck.

  • Thanks guys,

    I've done it, I needed to add disable and enable bullet to stop it from going until I've pressed and released the button.

    Here is the code in case someone else one day needs it.

    Thanks

  • Hi,

    I hope someone can help, I have a power button, when I hold it down the power bar moves up to 100 (like on a golf game, the longer you hold the button down the more power you see the bar go up)

    But I'm trying to fire a bullet only when the power button is released (using touch), matching the power at the point the button was released.

    I hope this makes sense.

    Thank you for your time.

  • Sorry, I was actually looking for a way to do this myself, and when you type in on google worms construct 2, this is at the top.

    I know the post was old, but if I found it while looking, then others would do the same, suggesting something on here seemed logical because I would have found it (as I did) and would have been happy with any suggestions.

    It was only reading the above posts that I came up with the idea I mentioned, which I'm now trying to do myself.

    Sorry if it's against the rules to add something to a post, but that's why I thought old posts are still around to help those that find them

    Sorry

  • You're right! wow, didn't know it was that simple! Thank you

  • You could create sprites as boulders, then have about 100 of them on top of each other to make the landscape, then when missile hits one or more of the boulders it destroys that.

    You could add different styles of rocks or boulders and then random their position, so that each time the game starts you have a new different landscape.

    Add wait .05 then add your players, maybe dropping them from top of screen, so they would land on the rocks no matter what random pattern it is.