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?
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
RE: Checking if the player is NOT inside an area?

(04-12-2012, 06:55 PM)ClayPigeon Wrote: Oh I haven't noticed the part on OnStart, silly me!
I'll check the second method for you mate Smile
Thanks for the help!
Your Welcome, I just realised something though. What happens if the player throws the object from inside the area? Or manages to reach in and hit it from outside the area?

Maybe a better way to do this would be like this:

void OnStart{ AddEntityCollideCallback(Stuff-Goes-Here!); }

void itemCollidesEntity(string &in asItem , string &in asEntity , int alState) {
if( GetPropIsInteractedWith(asItem) && (mon_health > 0) ){
// Player Swung item at Entity
}
else if(mon_health > 0){
// Player Threw item at Entity
}
}

Just a suggestion Tongue


(This post was last modified: 04-12-2012, 07:51 PM by DRedshot.)
04-12-2012, 07:48 PM
Find


Messages In This Thread
RE: Checking if the player is NOT inside an area? - by DRedshot - 04-12-2012, 07:48 PM



Users browsing this thread: 1 Guest(s)