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
Checking if the player is NOT inside an area?
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#11
RE: Checking if the player is NOT inside an area?

I knew this was somewhat related to the challenge thread.

FYI: In order for two entities to report collision via AddEntityCollideCallback, the "parent" entity must be able to go through the "child" entity. This is simple to replicate with AddAttachedPropToProp (since attached props lose their physical bodies). You attach, for example, a block box to the interactable entity and then you use AddEntityCollideCallback on the entity attached to the interactable entity. Then in the collision callback you check if the interactable entity is being interacted with so that you may differentiate between swinging an object and tossing one. Though, you should note that the monster could still take damage if it happens to walk into the object.

Tutorials: From Noob to Pro
04-13-2012, 10:52 AM
Website Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#12
RE: Checking if the player is NOT inside an area?

(04-13-2012, 10:52 AM)Your Computer Wrote: I knew this was somewhat related to the challenge thread.

FYI: In order for two entities to report collision via AddEntityCollideCallback, the "parent" entity must be able to go through the "child" entity. This is simple to replicate with AddAttachedPropToProp (since attached props lose their physical bodies). You attach, for example, a block box to the interactable entity and then you use AddEntityCollideCallback on the entity attached to the interactable entity. Then in the collision callback you check if the interactable entity is being interacted with so that you may differentiate between swinging an object and tossing one. Though, you should note that the monster could still take damage if it happens to walk into the object.
Yeah, I'm trying to complete the challenges as an achievement for myself Tongue

Thanks for the tip, I am going to rewrite the whole code, it had many problems anyway...
04-13-2012, 02:14 PM
Find




Users browsing this thread: 1 Guest(s)