////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "prisonkeylight_1", "mansion_3", "UsedKeyOnDoor1", true)
AddUseItemCallback("", "prisonkeydark_1", "mansion_3", "UsedKeyOnDoor2", true)
}
void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("prisonkeylight_1");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("prisonkeydark_1");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area1" , true , 1);
AddEntityCollideCallback("Player", "AreaPlayerTeleport", "CollidePlayerTeleport", true, 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
AddDebugMessage("You better hide!", false);
}
void Collide_Area1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_anim_wall_1" , true);
}
void CollidePlayerTeleport(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_2");
FadeOut(0);
FadeIn(20);
AddDebugMessage("Welcome To the Prison World!", false);
}
Problem again
, i got another problem, please help again.
The error says: "Could not load script file "custom_stories/One World To Another/maps/One World To Another.hps" main (6,1) ERR :Expected ";""
One World To Another [DEMO] coming soon.