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
Head collide
tratolak Offline
Junior Member

Posts: 16
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
Head collide

Hi

When i want to make a script which causes when head of the statue(knight) collides with area to do something, how do i do it? I already tried AddEntityCollideCallback("armour_nice_complete_1_Body_1", "ScriptArea_1", "secret", true, 1); but it doesn't do anything... do i have to do something in the Model editor?
(This post was last modified: 07-20-2012, 03:05 PM by tratolak.)
07-18-2012, 09:48 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Head collide

Try just doing the armor's name. Since the only part of the knight that you can move is the head, it should work. If not you probably have a map_cache issue, or you named something improperly. Go through the usual checks when running into problems like this


1) Check your maps folder, delete .map_cache files (close Amnesia before doing this, then restart)
2) Check naming conventions.
3) Use debug messages liberally, so you know what collisions happen, when they happen, and what objects were involved.

07-18-2012, 10:18 PM
Find
tratolak Offline
Junior Member

Posts: 16
Threads: 8
Joined: Jun 2012
Reputation: 0
#3
RE: Head collide

(07-18-2012, 10:18 PM)palistov Wrote: Try just doing the armor's name. Since the only part of the knight that you can move is the head, it should work. If not you probably have a map_cache issue, or you named something improperly. Go through the usual checks when running into problems like this


1) Check your maps folder, delete .map_cache files (close Amnesia before doing this, then restart)
2) Check naming conventions.
3) Use debug messages liberally, so you know what collisions happen, when they happen, and what objects were involved.
I tried to change the name to "armour_Body_1", delete map cache and checked my script for some mistakes. Nothing worked. Then i tried to put "Player" instead of "armour_Body_1" and it worked.

Here is the whole script:

void OnEnter()
{
AddEntityCollideCallback("armour_Body_1", "ScriptArea_1", "secret", true, 1);
}

void secret(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "Scrt", 3);
GiveSanityDamage(20.0f, true);
}
07-19-2012, 07:09 AM
Find
tratolak Offline
Junior Member

Posts: 16
Threads: 8
Joined: Jun 2012
Reputation: 0
#4
RE: Head collide

Ok after all i found another sollution how to make this working. I just used Collidecallback, but when the head(the head is counted as statue so i didnt had to put _Body_1) leaves a small area inside the head.
07-20-2012, 03:05 PM
Find




Users browsing this thread: 1 Guest(s)