(03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false?
Oh yes of course! Sry im new to this and thanks so much!
(03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false?
I did as you said but it dosen't work. The wall spawn but never goes away.
This is the script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "secret_key", "secret_door", "SECRET", true);
AddEntityCollideCallback("Player", "servant_grunt_1", "MonsterAway", true, 1);
}
void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "Awesome_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Awesome_door", 0, false);
RemoveItem("Awesome_key");
}
void SECRET(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "secret_door", false, true);
PlaySoundAtEntity("", "unlock_door", "secret_door", 0, false);
RemoveItem("secret_key");
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("popup_wall_1", true);
}
void MonsterAway(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("popup_wall_1", false);
}