How do I prevent collision checks in a menu screen?.

Get help using Construct 2

Post » Fri Apr 25, 2014 10:03 am

Hey all

I am having trouble trying to figure out why collision checks happen even though all the objects in that layout(main menu) have collisions disabled.
In my menu i've got the buttons and text to move in and out of the screen as needed when touched. In the Debugger it shows that the collision checks happen when the objects are moving and then back to zero checks when they have reached their destination position.
I have double checked and all the objects have collisions disabled and i've even put them in a family and disabled collisions on startup. But it's the same.
I noticed that when i put a new object with frames in them ,the collision checks had increased in count, could it be anything to do with objects with animation frames?.
B
16
S
4
Posts: 138
Reputation: 1,454

Post » Fri Apr 25, 2014 2:40 pm

I think you are only disabling collision on all objects on startup. But for new objects, when created, do not have collision disabled. You have to disable them via "on create" event.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Fri Apr 25, 2014 3:07 pm

Oh i didn't know that, but i have my objects on the layout from the start. I don't have a create event for it and i also don't destroy any of them. But i did realize there was no point in having them all at the start but there comes a time in the layout where almost all the objects are on screen together and the collision checks happen.
B
16
S
4
Posts: 138
Reputation: 1,454

Post » Sat Apr 26, 2014 4:37 am

Actually, "on created" event will run for all objects on startup as well. Because when the layout is loaded, these objects are created on the layout immediately.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469


Return to How do I....?

Who is online

Users browsing this forum: Solomon and 12 guests