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
AddEntityCollideCallBack(): Support Needed!
Watskeeee Offline
Junior Member

Posts: 8
Threads: 3
Joined: Jun 2012
Reputation: 0
#1
AddEntityCollideCallBack(): Support Needed!

void OnStart()
{
AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);
AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorroom01", true, true);
}


void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorroom01", false, true);
PlaySoundAtEntity("", "unlock_door", "doorroom01", 0, false);
RemoveItem("key01");
}


void keyfunc(string &in asEntity, string &in type)
{
SetEntityActive("servant_brute_1", true);
StartPlayerLookAt("servant_brute_1", 15, 15, "");
AddTimer("monstertimer", 2, "monstertimer");
ShowEnemyPlayerPosition("servant_brute_1");

}


void monstertimer(string &in asTimer)
{
StopPlayerLookAt();
}


Trying to make the door shut behind me, yet it comes up with the error;

FATAL ERROR: Could not load script file 'custom_stories/Amnesia - Hour of Twilight/maps/00_example.hps'!
main (5,1): ERR: No matching signatures to
'AddEntityCollideCallBack(string@&, string@&, string@&,const uint)'

Tried for an hours or two to fix this and no progress has been made..
06-19-2012, 02:19 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#2
RE: AddEntityCollideCallBack(): Support Needed!

make sure the hps and the map have the same name.

06-19-2012, 02:53 PM
Find
Watskeeee Offline
Junior Member

Posts: 8
Threads: 3
Joined: Jun 2012
Reputation: 0
#3
RE: AddEntityCollideCallBack(): Support Needed!

Yep, They have the exact same name.
00_example.hps
00_example.map
06-19-2012, 03:03 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#4
RE: AddEntityCollideCallBack(): Support Needed!

AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);
true is inside ".
06-19-2012, 03:32 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#5
RE: AddEntityCollideCallBack(): Support Needed!

AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);

AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);

they both call the same function

06-19-2012, 03:41 PM
Find
Watskeeee Offline
Junior Member

Posts: 8
Threads: 3
Joined: Jun 2012
Reputation: 0
#6
RE: AddEntityCollideCallBack(): Support Needed!

(06-19-2012, 03:32 PM)FastHunteR Wrote: AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);
true is inside ".
Thanks, I dunno why I didn't predict that was the problem, tried everything other than that! TongueTongue
06-19-2012, 03:43 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#7
RE: AddEntityCollideCallBack(): Support Needed!

(06-19-2012, 03:41 PM)Rownbear Wrote: AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);

AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);

they both call the same function
Many functions for keys opening doors are short because you use the same function. That ain't a problem, as long as asEntity and asItem are used, which is wrong here too.
(This post was last modified: 06-19-2012, 03:49 PM by Cruzore.)
06-19-2012, 03:47 PM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#8
RE: AddEntityCollideCallBack(): Support Needed!

void OnStart()
{
AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor1", true);
AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo",true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorroom01", true, true);
}


void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorroom01", false, true);
PlaySoundAtEntity("", "unlock_door", "doorroom01", 0, false);
RemoveItem("key01");
}


void keyfunc(string &in asEntity, string &in type)
{
SetEntityActive("servant_brute_1", true);
StartPlayerLookAt("servant_brute_1", 15, 15, "");
AddTimer("monstertimer", 2, "monstertimer");
ShowEnemyPlayerPosition("servant_brute_1");

}


void monstertimer(string &in asTimer)
{
StopPlayerLookAt();
}

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-20-2012, 05:33 AM
Find
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#9
RE: AddEntityCollideCallBack(): Support Needed!

No, you are doing it wrong again. Just. Put the same functions of Key 1 and Key 2.
But then, instead of "doorroom01" put in asEntity.
And at PlaySound instead of "doorroom01" you do asEntity
and at RemoveItem asItem.
This will make it remove the item that you used. Cause that's the String that it found. And the Entity too. If you don't know what the fuck I'm saying, read trough and see what I changed in your script.
PHP Code: (Select All)
void OnStart(){
AddUseItemCallback("""key01""doorroom01""KeyOnDoor"true);
AddUseItemCallback("""key02""doorroom02""KeyOnDoor"true);
AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo",true1);
}

void CollideRoomTwo(string &in asParentstring &in asChildint alState
{
SetSwingDoorClosed("doorroom01"truetrue);
}


void KeyOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity 0false);
RemoveItem(asItem);
}


void keyfunc(string &in asEntitystring &in type)
{
SetEntityActive("servant_brute_1"true);
StartPlayerLookAt("servant_brute_1"1515"");
AddTimer(""2"monstertimer");
ShowEnemyPlayerPosition("servant_brute_1");

}


void monstertimer(string &in asTimer)
{
StopPlayerLookAt();


Signature to awesome to be displayed.
(This post was last modified: 06-20-2012, 04:29 PM by Stepper321.)
06-20-2012, 04:28 PM
Find




Users browsing this thread: 1 Guest(s)