| 
		
	
		| FreshKorruption   Member
 
 Posts: 94
 Threads: 27
 Joined: Oct 2011
 Reputation: 
1
 | 
			| Help me script this!!! 
 
				Alright so here is the position I am in. I have it so when you pick up a key two monsters appear on each side of the room (I can do that). But when they appear, I want them to stand still and make the character spin towards one, then to the other, then spin around quickly towards the hallway. Basically, spin towards one enemy, the other, than turn around. I want to make it so they don't attack you until the player gains control again.
			 
 |  |  
	| 12-01-2011, 11:45 PM |  |  
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| RE: Help me script this!!! 
 
				My best guess is to just deactivate triggers in the entities tab of the monster, (this makes him not re-act to anything). And when the player regains control activate new monsters that chase him (don't check the deactivate triggers).
			 
 |  |  
	| 12-02-2011, 01:30 AM |  |  
	
		| GreyFox   Member
 
 Posts: 162
 Threads: 23
 Joined: Jul 2011
 Reputation: 
2
 | 
			| RE: Help me script this!!! 
 
				Lets Name your stuff real quick 
Charles1&Charles2(Left Side, they don't need these names) 
Frank1&Frank2(Right Side) 
Key1
 
Now for Charles1 and Frank1, do as Flamez3 said and check Deactivate Triggers, Then Make a Second (of the same Monster) in the same spot, but name it Charles2, or Frank2 (or whatever you want it to be called) and Make sure Deactivate triggers isn't checked. and make them inactive. 
 
make A script box in the hallway where you want to look I named it Hall1 (in the script)
 
Now if you want to alter the speeds, and or Add Sounds, Etc then Go ahead, but this Should work. 
 ////////////////////////////// Run first time starting map
 void OnStart()
 {
 SetEntityPlayerInteractCallback("Key", "Scare1", true);
 }
 
 void Scare1(string &in asEntity)
 {
 StartPlayerLookAt("Charles1", 5, 10, "");
 AddTimer("LookAtFrank1", 1.2, "LookAtFrank1");
 SetPlayerActive(false);
 }
 
 void LookAtFrank1(string &in asTimer)
 {
 StartPlayerLookAt("Frank1", 5, 10, "");
 AddTimer("LookAtHall", .8, "LookAtHall");
 }
 
 void LookAtHall(string &in asTimer)
 {
 StartPlayerLookAt("Hall1", 8, 10, "");
 AddTimer("GainControl" 0.2, "GainControl");
 }
 
 void GainControl(string &in asTimer)
 {
 SetEntityActive("Charles1", false);
 SetEntityActive("Frank1", false);
 SetEntityActive("Charles2", true);
 SetEntityActive("Frank2", true);
 SetPlayerActive(true);
 }
-Grey Fox
			
 Current Project Forgotten |  |  
	| 12-02-2011, 03:33 AM |  |  
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| RE: Help me script this!!! 
 
				 (12-02-2011, 03:33 AM)GreyFox Wrote:  Lets Name your stuff real quick
 Charles1&Charles2(Left Side, they don't need these names)
 Frank1&Frank2(Right Side)
 Key1
 
 Now for Charles1 and Frank1, do as Flamez3 said and check Deactivate Triggers, Then Make a Second (of the same Monster) in the same spot, but name it Charles2, or Frank2 (or whatever you want it to be called) and Make sure Deactivate triggers isn't checked. and make them inactive.
 
 make A script box in the hallway where you want to look I named it Hall1 (in the script)
 
 Now if you want to alter the speeds, and or Add Sounds, Etc then Go ahead, but this Should work.
 
 
 ////////////////////////////// Run first time starting map
 void OnStart()
 {
 SetEntityPlayerInteractCallback("Key", "Scare1", true);
 }
 
 void Scare1(string &in asEntity)
 {
 StartPlayerLookAt("Charles1", 5, 10, "");
 AddTimer("LookAtFrank1", 1.2, "LookAtFrank1");
 SetPlayerActive(false);
 }
 
 void LookAtFrank1(string &in asTimer)
 {
 StartPlayerLookAt("Frank1", 5, 10, "");
 AddTimer("LookAtHall", .8, "LookAtHall");
 }
 
 void LookAtHall(string &in asTimer)
 {
 StartPlayerLookAt("Hall1", 8, 10, "");
 AddTimer("GainControl" 0.2, "GainControl");
 }
 
 void GainControl(string &in asTimer)
 {
 SetEntityActive("Charles1", false);
 SetEntityActive("Frank1", false);
 SetEntityActive("Charles2", true);
 SetEntityActive("Frank2", true);
 SetPlayerActive(true);
 }
-Grey Fox
 You put it alot better than I did    
 |  |  
	| 12-02-2011, 06:33 AM |  |  
	
		| GreyFox   Member
 
 Posts: 162
 Threads: 23
 Joined: Jul 2011
 Reputation: 
2
 | 
			| RE: Help me script this!!! 
 
				I had the Time, Lol and wanted to do it. 
 I'm better at scripting if someone kinda directs me what they want (IE working with a team.)
 
 
 -Grey Fox
 
 
 Current Project Forgotten |  |  
	| 12-02-2011, 12:39 PM |  |  
	
		| FreshKorruption   Member
 
 Posts: 94
 Threads: 27
 Joined: Oct 2011
 Reputation: 
1
 | 
			| RE: Help me script this!!! 
 
				 (12-02-2011, 03:33 AM)GreyFox Wrote:  Lets Name your stuff real quick
 Charles1&Charles2(Left Side, they don't need these names)
 Frank1&Frank2(Right Side)
 Key1
 
 Now for Charles1 and Frank1, do as Flamez3 said and check Deactivate Triggers, Then Make a Second (of the same Monster) in the same spot, but name it Charles2, or Frank2 (or whatever you want it to be called) and Make sure Deactivate triggers isn't checked. and make them inactive.
 
 make A script box in the hallway where you want to look I named it Hall1 (in the script)
 
 Now if you want to alter the speeds, and or Add Sounds, Etc then Go ahead, but this Should work.
 
 
 ////////////////////////////// Run first time starting map
 void OnStart()
 {
 SetEntityPlayerInteractCallback("Key", "Scare1", true);
 }
 
 void Scare1(string &in asEntity)
 {
 StartPlayerLookAt("Charles1", 5, 10, "");
 AddTimer("LookAtFrank1", 1.2, "LookAtFrank1");
 SetPlayerActive(false);
 }
 
 void LookAtFrank1(string &in asTimer)
 {
 StartPlayerLookAt("Frank1", 5, 10, "");
 AddTimer("LookAtHall", .8, "LookAtHall");
 }
 
 void LookAtHall(string &in asTimer)
 {
 StartPlayerLookAt("Hall1", 8, 10, "");
 AddTimer("GainControl" 0.2, "GainControl");
 }
 
 void GainControl(string &in asTimer)
 {
 SetEntityActive("Charles1", false);
 SetEntityActive("Frank1", false);
 SetEntityActive("Charles2", true);
 SetEntityActive("Frank2", true);
 SetPlayerActive(true);
 }
-Grey Fox
 Thanks it worked perfectly. My only issue is that it won't stop looking at hall1 after it looks at the grunts.
			 
 |  |  
	| 12-13-2011, 03:08 AM |  |  
	
		| ggstarfoxxie   Junior Member
 
 Posts: 36
 Threads: 9
 Joined: Aug 2011
 Reputation: 
2
 | 
			| RE: Help me script this!!! 
 
				Try this:
 void GainControl(string &in asTimer)
 {
 SetEntityActive("Charles1", false);
 SetEntityActive("Frank1", false);
 SetEntityActive("Charles2", true);
 SetEntityActive("Frank2", true);
 SetPlayerActive(true);
 StopPlayerLookAt();
 }
 
 
 |  |  
	| 12-13-2011, 04:26 AM |  |  
	
		| GreyFox   Member
 
 Posts: 162
 Threads: 23
 Joined: Jul 2011
 Reputation: 
2
 | 
			| RE: Help me script this!!! 
 
				My Bad, In my Mind I though I put that in there. Do what GGstarfoxxie said and it should be good. 
 Good Luck and Thanks Foxxie
 -Grey Fox
 
 
 Current Project Forgotten |  |  
	| 12-13-2011, 04:57 AM |  |  |