How do I make my characters act right on new layout

Get help using Construct 2

Post » Sun Nov 29, 2015 2:55 pm

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
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 3:00 pm

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?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 29, 2015 3:21 pm

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...
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 3:32 pm

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.....
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 3:33 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 29, 2015 3:38 pm

How do i post the capx here? Can i post it here??
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 3:44 pm

Pm your email address to me, i i will forward the capx if you like.
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 4:01 pm

Message: RyansDigital is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
lol, no laughing at my first basic game!!
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 4:02 pm

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
Last edited by RyansDigital on Sun Nov 29, 2015 4:15 pm, edited 3 times in total.
B
3
Posts: 8
Reputation: 191

Post » Sun Nov 29, 2015 4:06 pm

RyansDigital wrote: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.

Code: Select all
h*ttp*//w*ww.mysite.com/mygame.capx
If your vision so exceeds your ability, then look to something closer.
Moderator
B
126
S
29
G
73
Posts: 5,091
Reputation: 52,002

Next

Return to How do I....?

Who is online

Users browsing this forum: MAVERICK, tarek2 and 4 guests