| 
		
	
		| ironman0001   Member
 
 Posts: 53
 Threads: 8
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				 (10-01-2012, 07:53 PM)ironman0001 Wrote:   (10-01-2012, 07:43 PM)Nemet Robert Wrote:  With a script?And is there a way to make an enemy just stand without attacking?
 Use this function:
 
 void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
 void StopPlayerLookAt();
 Forces the player to look at a certain entity until StopPlayerLookAt is used.
 asEntityName - the entity to look at
 afSpeedMul - how fast should the player look at the entity
 afMaxSpeed - maximum speed allowed
 asAtTargetCallback - function to call when player looks at target
 And one more thing! How do i make a player crouch as soon as the game starts?
			 |  |  
	| 10-01-2012, 07:59 PM |  |  
	
		| Robby   Posting Freak
 
 Posts: 2,549
 Threads: 38
 Joined: Jun 2009
 Reputation: 
47
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				void SetPlayerCrouching(bool abCrouch);Forces the player to crouch.
 
 Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active. |  |  
	| 10-01-2012, 08:00 PM |  |  
	
		| KingWolf   Member
 
 Posts: 135
 Threads: 2
 Joined: Sep 2012
 Reputation: 
7
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				You sure know how to help peeps, Robby.
			 
 |  |  
	| 10-01-2012, 08:02 PM |  |  
	
		| ironman0001   Member
 
 Posts: 53
 Threads: 8
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				errr 2 more questions xD How do i make it where the monster doesn't make any noise and how do i make it where the screen goes black and the person teleports somewhere?
			 |  |  
	| 10-01-2012, 08:20 PM |  |  
	
		| Robby   Posting Freak
 
 Posts: 2,549
 Threads: 38
 Joined: Jun 2009
 Reputation: 
47
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				For the 1st one, you'll have to edit the entity. Easier alternative is:Use FadeGlobalSoundVolume(0, 0); Then reset it back to 1 after the monster spawned. Use a timer for that.
 
 
 2nd one:
 Use the "FadeOut(1);" function, then use a timer that triggers at least 1 second later, which will use the "Teleport("StartPosName");" function, and also use the "FadeIn(1);" function too.
 Don't include the quotes.
 
 Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active. 
				
(This post was last modified: 10-01-2012, 08:24 PM by Robby.)
 |  |  
	| 10-01-2012, 08:22 PM |  |  
	
		| ironman0001   Member
 
 Posts: 53
 Threads: 8
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				 (10-01-2012, 08:22 PM)Nemet Robert Wrote:  For the 1st one, you'll have to edit the entity. Easier alternative is:Use FadeGlobalSoundVolume(0, 0); Then reset it back to 1 after the monster spawned. Use a timer for that.
 
 
 2nd one:
 Use the "FadeOut(1);" function, then use a timer that triggers at least 1 second later, which will use the "Teleport("StartPosName");" function, and also use the "FadeIn(1);" function too.
 Don't include the quotes.
 How do i use timers?
			 |  |  
	| 10-01-2012, 08:27 PM |  |  
	
		| Robby   Posting Freak
 
 Posts: 2,549
 Threads: 38
 Joined: Jun 2009
 Reputation: 
47
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				AddTimer("", 1.0f, "CallbackName");
 Syntax:
 
 void CallbackName(string &in asTimer)
 {
 //Script functions here
 }
 
 Replace CallbackName with whatever you want, but make sure both names match.
 
 You can also replace 1 with the amount of second you want.
 
 And in //Script functions here. Well you can guess that.
 
 Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active. |  |  
	| 10-01-2012, 08:29 PM |  |  
	
		| ironman0001   Member
 
 Posts: 53
 Threads: 8
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				I'm trying to test out the script by having the guy look at one bottle and then another bottle! But he only looks at the first bottle! But he doesn't look at the second one! Here is the script
 
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
 AddEntityCollideCallback("Player", "Area_8", "start1", true, 1);
 AddEntityCollideCallback("Player", "Area_8", "start2", true, 1);
 }
 
 void start(string &in asParent, string &in asChild, int alState)
 {
 StartPlayerLookAt("wine01_2", 30, 50, "");
 AddTimer("fadein1", 1, "intro");
 }
 
 void intro(string &in asTimer)
 {
 StopPlayerLookAt();
 RemoveTimer("fadein1");
 }
 
 void start1(string &in asTimer)
 {
 AddTimer("start_t2", 1, "start2");
 }
 
 void start2(string &in asTimer)
 {
 RemoveTimer("start_t2");
 StartPlayerLookAt("wine01_23", 30, 50, "");
 }
 |  |  
	| 10-01-2012, 09:44 PM |  |  
	
		| ironman0001   Member
 
 Posts: 53
 Threads: 8
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				 (10-01-2012, 09:44 PM)ironman0001 Wrote:  I'm trying to test out the script by having the guy look at one bottle and then another bottle! But he only looks at the first bottle! But he doesn't look at the second one! Here is the script
 
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
 AddEntityCollideCallback("Player", "Area_8", "start1", true, 1);
 AddEntityCollideCallback("Player", "Area_8", "start2", true, 1);
 }
 
 void start(string &in asParent, string &in asChild, int alState)
 {
 StartPlayerLookAt("wine01_2", 30, 50, "");
 AddTimer("fadein1", 1, "intro");
 }
 
 void intro(string &in asTimer)
 {
 StopPlayerLookAt();
 RemoveTimer("fadein1");
 }
 
 void start1(string &in asTimer)
 {
 AddTimer("start_t2", 1, "start2");
 }
 
 void start2(string &in asTimer)
 {
 RemoveTimer("start_t2");
 StartPlayerLookAt("wine01_23", 30, 50, "");
 }
 Hello???
			 |  |  
	| 10-01-2012, 11:18 PM |  |  
	
		| Statyk   Schrödinger's Mod
 
 Posts: 4,390
 Threads: 72
 Joined: Sep 2011
 Reputation: 
241
 | 
			| RE: My grunt hallucination is turned completely around and isn't running towards me 
 
				void OnStart(){
 AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
 }
 
 void start(string &in asParent, string &in asChild, int alState)
 {
 StartPlayerLookAt("wine01_2", 30, 50, "");
 AddTimer("fadein1", 2, "intro");
 }
 
 void intro(string &in asTimer)
 {
 StartPlayerLookAt("wine01_23", 30, 50, "");
 AddTimer("", 2, "stoplook");
 }
 
 void stoplook(string &in asTimer)
 {
 StopPlayerLookAt();
 }
 
				
(This post was last modified: 10-01-2012, 11:30 PM by Statyk.)
 |  |  
	| 10-01-2012, 11:30 PM |  |  |