Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: Easy Cuestion
It's literally only 1 symbol different.
void OnStart()
{
AddUseItemCallback("", "Key123", "Door123", "UseKeyOnDoor", true);
AddUseItemCallback("", "Study123", "Doors122", "UseKeyOnDoor2", true);
AddEntityCollideCallback("Player", "Area1", "LookBack, true, 1); //<- This ';' symbol.
}
|
|
03-11-2014, 10:08 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
RE: Easy Cuestion
.hps
AddEntityCollideCallback("Player", "Area1", "LookBack", true, 1);
void FunctionName(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Door123", 20, 25, "CallbackName");
}
void CallbackName()
{
StopPlayerLookAt();
}
and no error showed just not working...
|
|
03-12-2014, 01:28 PM |
|
Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
RE: Easy Cuestion
AddEntityCollideCallback("Player", "Area1", "LookBack", true, 1);
void LookBack(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Door123", 20, 25, "CallbackName");
}
void CallbackName()
{
StopPlayerLookAt();
}
The function was supposed to be named LookBack, not FunctionName.
|
|
03-12-2014, 02:05 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Easy Cuestion
Aand the AddEntityCollideCallback should be in OnStart() like Mudbill pointed out.
Discord: Romulator#0001
|
|
03-12-2014, 02:13 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
RE: Easy Cuestion
Like this ??? if not PLEASE set .hps how need to be to finish this Thread...
void OnStart()
{
AddUseItemCallback("", "Key123", "Door123", "UseKeyOnDoor", true);
AddUseItemCallback("", "Study123", "Doors122", "UseKeyOnDoor2", true);
AddEntityCollideCallback("Player", "Area1", "LookBack", true, 1);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door123", false, true);
PlaySoundAtEntity("", "unlock_door", "Door123", 0, false);
RemoveItem("Key123");
}
void UseKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Doors122", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Doors122", 0, false);
RemoveItem("Study123");
}
void FunctionName(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Door123", 20, 25, "CallbackName");
}
void CallbackName()
{
StopPlayerLookAt();
}
|
|
03-12-2014, 05:57 PM |
|
Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
RE: Easy Cuestion
Can you look at my post please and see what I changed? The function is supposed to be called LookBack, NOT FunctionName.
|
|
03-12-2014, 06:01 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
RE: Easy Cuestion
Yeah sorry today it's not my lucky day but at least it worked THANKS
(This post was last modified: 03-12-2014, 07:29 PM by Straxedix.)
|
|
03-12-2014, 07:27 PM |
|
|