10-13-2012, 09:02 PM
(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:Nope, same error. As I said, I didn't change the map1.hps file at all.
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.
(10-13-2012, 09:02 PM)Rapsis Wrote: [ -> ]Figured out myself. Again, it was my stupidity.(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:Nope, same error. As I said, I didn't change the map1.hps file at all.
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.