04-22-2011, 10:28 AM
Hello, ive been working hours for this to work, and well im no awesome programmer. Here's what i want to do?
I want player to walk to a script area, named "ScriptArea_1". when the player walk in the area, i wanted a monster to spawn behind player, and make the camera on the monster for 1.5 seconds. the monster i wish to be behind him is "servant_grunt_2" (02 for being another one in the level) i have no idea how to do this, i have looked on google and youtube and all the tutorials for triggering are on making doors shut behind people and not the things i want, now i hope anyone could help me with this delima, i have worked on it for hours with no possible solution in the near future, i would really appreciate any help i can get.
Thanks
Please People! I need help!
I ADDED MORE STUFF IN, THIS IS THE WHOLE SCRIPT
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_2" , true);
}
AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_metal_1", false, true);
}
im making the cabnit closed and locked. im making it open with a key on a table(odley enough) and it doesnt seem to be working, this keeps stuffing up : AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true); JUST AFTER THE ADDUSEITEMCALLBACK thing it says theres a expected identifier, but i don't know to put one in.
I want player to walk to a script area, named "ScriptArea_1". when the player walk in the area, i wanted a monster to spawn behind player, and make the camera on the monster for 1.5 seconds. the monster i wish to be behind him is "servant_grunt_2" (02 for being another one in the level) i have no idea how to do this, i have looked on google and youtube and all the tutorials for triggering are on making doors shut behind people and not the things i want, now i hope anyone could help me with this delima, i have worked on it for hours with no possible solution in the near future, i would really appreciate any help i can get.
Thanks
Please People! I need help!
I ADDED MORE STUFF IN, THIS IS THE WHOLE SCRIPT
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_2" , true);
}
AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_metal_1", false, true);
}
im making the cabnit closed and locked. im making it open with a key on a table(odley enough) and it doesnt seem to be working, this keeps stuffing up : AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true); JUST AFTER THE ADDUSEITEMCALLBACK thing it says theres a expected identifier, but i don't know to put one in.