ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
RE: Need some script help!
(02-24-2012, 11:45 PM)Obliviator27 Wrote: (02-24-2012, 11:42 PM)ammislol Wrote: (02-24-2012, 11:29 PM)Obliviator27 Wrote: To lock the Camera, put
SetPlayerActive(false); in the StartLookSequence function, and then
I messed up on the timers. Where it says
AddTimer("LookTimee4", 12, "NextLook");
Replace it with
AddTimer("LookTimer4", 12, "NextLook");
And finally, put
SetPlayerActive(true);
where the SetEntityActive script is. So where excact should i change? my script looks like this atm -
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_5", "StartLookSequence", false, 1);
}
void StartLookSequence(string &in asParent, string &in asChild, int alState)
{
AddTimer("LookTimer1", 4, "NextLook");
AddTimer("LookTimer2", 8, "NextLook");
AddTimer("LookTimer3", 12, "NextLook");
AddTimer("LookTimer4", 12, "NextLook");
StartPlayerLookAt("ScriptArea_1", 2, 2, "");
SetPlayerActive(false);
}
void NextLook(string &in asTimer)
{
if(asTimer == "LookTimer1")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
if(asTimer == "LookTimer2")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_3", 2, 2, "");
}
if(asTimer == "LookTimer3")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_4", 2, 2, "");
}
if(asTimer == "LookTimer4")
{
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
}
}
Sorry for being such a noob :< Great help tho! thanks alot. ^ Fix'd.
Works great! now only one more thing LOL :<
The camera moves to area1,2 and 3, but not 4. It just stops after the 3rd, then the monster spawns and breaks the door, but if i stay around the ScriptArea_5. It keeps repeating so it looks at the areas while getting killed by the monster, is there anyway to make it so only look at it once, not everytime i enter the area, if you understand? and how to add a sound when i enter the ScriptArea_5? Sorry for all questions, hope you dont mind.
(This post was last modified: 02-25-2012, 12:14 AM by ammislol.)
|
|