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 fatal error?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: Script fatal error?

No, it's you Wink the engine does whatever it has to do. All the fails (or almost all) are human. So, let's see:

You have this:

void OnStart()

{

AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0);

AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);

}



void CollideRoomTwo(string &in asParent, string &in asChild, int alState)

{

SetSwingDoorClosed("mansion_2", true, true);

}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("mansion_1", false, true);

PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);

RemoveItem("bedroomkey_1");

}



void OnLeave()

{



}


The error is here:

void OnStart()

{

AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 1);

AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);

}



void CollideRoomTwo(string &in asParent, string &in asChild, int alState)

{

SetSwingDoorClosed("mansion_2", true, true);

}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("mansion_1", false, true);

PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);

RemoveItem("bedroomkey_1");

}



void OnLeave()

{



}

The AddEntityCollideCallback always end with a 1 or a -1. When you put 0, the engine turns mad. That was the issue.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-13-2012, 08:58 PM
Find


Messages In This Thread
Script fatal error? - by Rapsis - 10-13-2012, 06:12 PM
RE: Script fatal error? - by Adny - 10-13-2012, 06:22 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:31 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 06:48 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:52 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:57 PM
RE: Script fatal error? - by Adny - 10-13-2012, 06:47 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 06:56 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 08:47 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 08:58 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 09:02 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 09:54 PM



Users browsing this thread: 4 Guest(s)