Frictional Games Forum (read-only)

Full Version: Colliding two entities
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So i am trying to make it so when the user tosses a chair at the door, the door opens. However, whenever i try to add an entity collide callback, the game crashes at that point. The following statement is the culprit:
Code:
AddEntityCollideCallback("front_door", "armchair_1", "EntityCollided", true, 0);

Is the game not designed to handle entity-to-entity collision? Or am i supposed to use a different function? Or is the only way to accomplish my goal is through the use of areas? Or...?

Huh
It should work, but you should try to swap the string &in asParent and the string &in asChild and also have the collision type to be 1. If it doesn't work, then put a script area on the door to where "armchair_1" collides with the script area causing "armchair_1" to hit the door indefinately.

AddEntityCollideCallback("armchair_1", "front_door", "EntityCollided", true, 1);

OR

AddEntityCollideCallback("armchair_1", "ScriptArea_1", "EntityCollided", true, 1);
Hmm, switching the parent with child prevents the game from crashing, but the collision isn't being triggered. Changing alStates doesn't help either. Seems i might have to go with an area...
(07-27-2011, 02:17 PM)Your Computer Wrote: [ -> ]Hmm, switching the parent with child prevents the game from crashing, but the collision isn't being triggered. Changing alStates doesn't help either. Seems i might have to go with an area...

You probably will have to use an area, trying to collide two solid bodies is unreliable.