Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Colliding two entities
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#1
Question  Colliding two entities

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:
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
07-27-2011, 01:41 PM
Website Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Colliding two entities

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);

07-27-2011, 01:46 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Colliding two entities

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
Website Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: Colliding two entities

(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.
07-27-2011, 02:35 PM
Find




Users browsing this thread: 1 Guest(s)