Frictional Games Forum (read-only)
Can someone explain how to make a CollideCallback to work with monster and player? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Can someone explain how to make a CollideCallback to work with monster and player? (/thread-14368.html)



Can someone explain how to make a CollideCallback to work with monster and player? - xxiitrysohardxx - 03-31-2012

I need someone to help me with getting this to work. I'm using "AddEntityCollideCallback" on the monster and player, and I'm trying to get it to where when the monster collides with the player (i.e. hitting the player) so I can use Callback Functions.



RE: Can someone explain how to make a CollideCallback to work with monster and player? - SplitHeadProduction - 03-31-2012

just put the asParent as the monsters name and for the asChild put that as Player


that should work


RE: Can someone explain how to make a CollideCallback to work with monster and player? - xxiitrysohardxx - 03-31-2012

Could you type out exactly how I'd have it in the script? I'm sorry, I'm sort of a novice at this.

Wait, I have tried that and won't work. Is this what it's supposed to look like?
AddEntityCollideCallback("monster_2", "Player", "KnockOut", true, 1);




RE: Can someone explain how to make a CollideCallback to work with monster and player? - SplitHeadProduction - 03-31-2012

(03-31-2012, 05:40 AM)xxiitrysohardxx Wrote: Could you type out exactly how I'd have it in the script? I'm sorry, I'm sort of a novice at this.

Wait, I have tried that and won't work. Is this what it's supposed to look like?
AddEntityCollideCallback("monster_2", "Player", "KnockOut", true, 1);
yeah it should look like that. you have to have the function script as well telling the game what to do after this collision happens