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
Script Help Easy Cuestion
Mudbill Offline
Muderator

Posts: 3,816
Threads: 59
Joined: Apr 2013
Reputation: 177
#11
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
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#12
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
Find Reply
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#13
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
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,623
Threads: 62
Joined: Jan 2013
Reputation: 195
#14
RE: Easy Cuestion

Aand the AddEntityCollideCallback should be in OnStart() like Mudbill pointed out.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-12-2014, 02:13 PM
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#15
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
Find Reply
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#16
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
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#17
RE: Easy Cuestion

Yeah sorry today it's not my lucky day but at least it worked THANKS Big Grin

(This post was last modified: 03-12-2014, 07:29 PM by Straxedix.)
03-12-2014, 07:27 PM
Find Reply




Users browsing this thread: 1 Guest(s)