Rapsis
Member
Posts: 69
Threads: 6
Joined: Oct 2012
Reputation:
0
|
RE: Script fatal error?
(10-13-2012, 08:58 PM)The chaser Wrote: No, it's you 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 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 |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Script fatal error?
Well, the time and experience solves that kind of things. Next time post at Development support
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-13-2012, 09:54 PM |
|
|