How do I make my characters act right on new layout

0 favourites
  • 11 posts
From the Asset Store
Create your game with this complete pack of images and animations!
  • Hi everyone, so i am new to construct, learning more every day. I am creating a top down tower defense game, it is a college project, due in 2moro!!

    I have a main menu and 3 levels. each level works fine when loaded on there own from within construct. However when i start the game and play level 1, get 10 kills, level 2 launches and my enemy sprite does not act properly at all, it goes through solid objects, acts erratic and heads to the finish point in the level all wrong.

    This also happens if i load level 2 and get my 10 kills then level 3 launches all wrong the enemy sprite doesnt behave correctly at all.

    As i said above when i load each level individualy from the editor the levels work fine and the enemy behaves the way it is meant to behave. I just dont get why the enemy acts all wack when i try to play through the game normally.

    I hope i am posting in the correct area, any insight or help at all would be greatly appreciated guys and girls. Thanks very much

  • what is the difference between playing the level directly and in sequence?

    Are there global variables that have changed and have effect?

    Are you using time or tickcounts in your events?

  • Hi thanks for your reply!

    What i meant was when i run each layout(level) individually the enemy behaves the correct way.

    BUT when i load the main menu, click on start game, level 1 launches fine, i play through the level and get 10 kills, then level2 launches but the enemy isnt acting correctly at all, not pathfinding to the finish point in the right way at all.

    There is global variables, kills, lives, enemy spawn time, but these all get reset at the start of new layout.

    I am using tick events just to keep count of the variables, kills and lives. also using a tick event for the camera to set it over enemy every tick. I am wondering do i even need the camera as i am using the scroll to behaviour on the enemy also.

    NEW POINT>>>>>> I just added the 'regenerate pathfinding obstacle map' to my event sheet. i added it just underneath the go to next layout condition.. It works a LITTLE, my enemies are now pathfinding correctly!!

    1 Problem as always... The first instance of my enemy that is spawned on the new level still acts wrong but the instances of enemies spawned from there on in are acting great and pathfinding correctly.

    Just this first spawned enemy now is still wrong...

  • Ok so it worked for about 5 minutes, now it is broke again.

    I dont get what is going wrong at all.

    The regenerate path worked for a couple of games now it is back to the way it was before!!

    Pure lost, im trying to sort this out with about 6 hours now.....

  • without seeing the events and/or the capx, we can only guess..

    You might try destroying the first enemy on start of layout, I guess it's already pathfinding before the obstacle map is regenerated..

  • How do i post the capx here? Can i post it here??

  • Pm your email address to me, i i will forward the capx if you like.

  • lol, no laughing at my first basic game!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Scirra wont let me post the url to my game file. not enough rep on the forums..

    so any other suggestions?

    ht*tps:*//drive.google.com/file/d/0B_QzXL15qqFJTlpTWVEtSHNxZ28/view?usp=sharing

    URL to capx, obviously you need to remove the two asterix

  • wont let me post the url to my game file. not enough rep on the forums..

    so any other suggestions?

    Firstly, there is no need to multi-post to this extent. Just use the 'pencil' icon to edit your post.

    Secondly, you can bypass the posting restriction by inserting characters such as a space or asterisk in to the URL, e.g.

    h*ttp*//w*ww.mysite.com/mygame.capx
    [/code:r4obkkzx]
  • Thanks for the tips

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)