Rapture
Posting Freak
Posts: 1,078
Threads: 79
Joined: May 2011
Reputation:
30
|
Scripting Help
Hi, I'm new to scripting so I've been mostly copying, pastying and guessing at what goes where. I think my scripting is not working at the parameters for a function called "RosePetals". I'm not sure what to put in it.
void RosePetal()
{
SetEntityInteractionDisabled("carpet_moveable_1", false);
StartPlayerLookAt("RosePetals", 5.0f, 5.0f, "");
CreateParticleSystemAtEntity("RosePetals", "ps_rose_petals_loop.ps", "RosePetals", false);
AddDebugMessage("Petals Are gonna Fall!", false);
}
Basically I have a entity that is disabled
AddEntityCollideCallback("Player", "LookToSafety", "RosePetal", true, 1);
So when I first enter the area where the monsters will spawn up, it will activate the area just back in the room.
void MonsterFunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("LookToSafety", true);
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_54", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_55", 0.0f, "");
SetEntityActive("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_10", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_11", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_12", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_13", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_14", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_15", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_8", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_9", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_54", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_55", 0.00f, "");
AddDebugMessage("Monsters Work", false);
}
So basically I want my area called RosePetal to work. Here is the entire script. Anyone that can help would be awesome!
Is their any way to upload the map? It won't let me since it doesn't support the file extension.
void OnStart()
{
SetEntityInteractionDisabled("carpet_moveable_1", true);
AddUseItemCallback("", "key_study_1", "prison_1", "UnlockDoor", true);
AddEntityCollideCallback("Player", "StartMonsters", "MonsterFunction1", true, 1);
AddEntityCollideCallback("Player", "MonsterMove", "MonsterFunction2", true, 1);
AddEntityCollideCallback("Player", "LookToSafety", "RosePetal", true, 1);
}
void Intro()
{
}
void OnEnter()
{
}
void MonsterFunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("LookToSafety", true);
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_54", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_55", 0.0f, "");
SetEntityActive("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_10", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_11", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_12", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_13", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_14", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_15", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_8", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_9", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_54", 0.00f, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_55", 0.00f, "");
AddDebugMessage("Monsters Work", false);
}
void RosePetal()
{
SetEntityInteractionDisabled("carpet_moveable_1", false);
StartPlayerLookAt("RosePetals", 5.0f, 5.0f, "");
CreateParticleSystemAtEntity("RosePetals", "ps_rose_petals_loop.ps", "RosePetals", false);
AddDebugMessage("Petals Are gonna Fall!", false);
}
void MonsterFunction2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_suitor_1", true);
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_26", 1.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_16", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_17", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_18", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_19", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_20", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_21", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_22", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_23", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_24", 0.0f, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_25", 0.0f, "");
}
void KeyStart(string &in entity, string &in type)
{
PlayMusic("10_puzzle02.ogg", false, 0.7, 0.1, 10, false);
SetEntityActive("servant_grunt_9", true);
AddEnemyPatrolNode("servant_grunt_9", "PathNodeArea_55", 0.0f, "");
}
void UnlockDoor(string &in entity, string &in type)
{
SetSwingDoorLocked("prison_1", false, true);
PlaySoundAtEntity("unlocksound", "unlock_door.snt", "Player", 0.0f, false);
GiveSanityBoostSmall();
RemoveItem("key_study_1");
}
(This post was last modified: 07-19-2011, 08:08 PM by Rapture.)
|
|