Frictional Games Forum (read-only)

Full Version: Script fatal error?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(10-13-2012, 08:58 PM)The chaser Wrote: [ -> ]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:

Code:
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:

Code:
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.
Nope, same error. As I said, I didn't change the map1.hps file at all.

(10-13-2012, 09:02 PM)Rapsis Wrote: [ -> ]
(10-13-2012, 08:58 PM)The chaser Wrote: [ -> ]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:

Code:
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:

Code:
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.
Nope, same error. As I said, I didn't change the map1.hps file at all.
Figured out myself. Again, it was my stupidity.
Well, the time and experience solves that kind of things. Next time post at Development support Wink
Pages: 1 2