Too Many Collision Events
#1
Posted 07 October 2009 - 09:57 PM
#2
Posted 07 October 2009 - 10:02 PM
#3
Posted 07 October 2009 - 10:06 PM
Step event:
if place_meeting(x,y,obj1) place_meeting(x,y,obj2) etc, etc, etc, instance_destroy();
#4
Posted 07 October 2009 - 10:12 PM
uhm take out the redundancy.In the game I am making there are a redundacy of collision events for one object and I need a unified script to put all of the collision events together as one. Thank you.
unless timing is the problem there is no need to have multiple collision checks for one item. just put all the code under one collision check. with the use of blocks you take out all the redunancy
#5
Posted 07 October 2009 - 10:18 PM
I don't have multiple collision events for one object, I just have many objects with the same collision event.uhm take out the redundancy.In the game I am making there are a redundacy of collision events for one object and I need a unified script to put all of the collision events together as one. Thank you.
unless timing is the problem there is no need to have multiple collision checks for one item. just put all the code under one collision check. with the use of blocks you take out all the redunancy
#6
Posted 07 October 2009 - 10:19 PM
I think he means that in one object there are many objects which when collided with achieve the same thing.uhm take out the redundancy.In the game I am making there are a redundacy of collision events for one object and I need a unified script to put all of the collision events together as one. Thank you.
unless timing is the problem there is no need to have multiple collision checks for one item. just put all the code under one collision check. with the use of blocks you take out all the redunancy
#7
Posted 07 October 2009 - 10:22 PM
Make an object called obj_block_parent or whatnot, and set it as the parent of every object that is subject to the collision event.
#8
Posted 07 October 2009 - 11:43 PM
I think it is also better programming practice to only use Step event and trap collisions there. For example, just use a bunch of collision checkings statements in the Step event that call related processing scripts like:
if place_meeting(x, y, objParentEnemy) then scriptProcessCollisionEnemy(); if place_meeting(x, y, objParentCoin) then scriptProcessCollisionCoin(); // etc ...
#9
Posted 08 October 2009 - 12:18 AM
make a script that they all share and just call the one script in all of their collision eventsI don't have multiple collision events for one object, I just have many objects with the same collision event.uhm take out the redundancy.In the game I am making there are a redundacy of collision events for one object and I need a unified script to put all of the collision events together as one. Thank you.
unless timing is the problem there is no need to have multiple collision checks for one item. just put all the code under one collision check. with the use of blocks you take out all the redunancy
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











