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?
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#11
RE: Script fatal error?

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

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

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.
Nope, same error. As I said, I didn't change the map1.hps file at all.
Figured out myself. Again, it was my stupidity.
(This post was last modified: 10-13-2012, 09:41 PM by Rapsis.)
10-13-2012, 09:02 PM
Find
The chaser Offline
Posting Freak

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

Well, the time and experience solves that kind of things. Next time post at Development support Wink

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-13-2012, 09:54 PM
Find




Users browsing this thread: 6 Guest(s)