lothabread 
			Member2  
	
		
			
Simulate the player being dragged ? 
 
				Well as you can all probably tell by the title of the thread. I'm in need of a script that would make it look and sound as if the player was being dragged by an enemy, but I've not the slightest clue of how to go about this or if its even really possible. Any input would be greatly appreciated ^^
			
			
			
			
		 
 
 
	03-08-2014, 08:06 PM  
		
	 
 
	
		Neelke 
			Senior Member26  
	
		
			
RE: Simulate the player being dragged ? 
 
				This might be something to start off with.
void OnStart()
But sometimes, try checking through all the scripts yourselves. You learn quicker 
 
 
 
	03-08-2014, 08:54 PM  
		
	 
 
	
		Deadon 
			Member1  
	
		
			
RE: Simulate the player being dragged ? 
 
				Also, for a better sense of being dragged (that most don't seem to get/notice) is that it's better to pulse (listen to the drag noise) than to keep the same speed.
			
			
			
2 Mappers are definitely better than one.
			
		 
 
 
	03-08-2014, 08:57 PM  
		
	 
 
	
		Neelke 
			Senior Member26  
	
		
			
RE: Simulate the player being dragged ? 
 
				Well Deadon, I used a sound which fitted this perfectly, but I'm certain he doesn't have it. Unless he got the conversion mod The Fugitive 2.
			
			
			
				
(This post was last modified: 03-08-2014, 09:47 PM by Neelke .) 
 
				
			 
		 
 
 
	03-08-2014, 09:47 PM  
		
	 
 
	
		lothabread 
			Member2  
	
		
			
RE: Simulate the player being dragged ? 
 
				whats the best configuration to have the players head on the floor ?
			
			
			
		 
 
 
	03-23-2014, 06:28 AM  
		
	 
 
	
		Romulator 
			Not Tech Support ;-)195  
	
		
			
RE: Simulate the player being dragged ? 
 
				Didn't test this (rather stole it from the wiki's 
wake up tutorial ), but it might also help:
FadePlayerRollTo(50, 220, 220); // Simulate being on the floor
Since you have FadePlayerRollTo, you are heading in the right direction (no pun intended)
			
Discord: Romulator#0001 
				
(This post was last modified: 03-23-2014, 12:08 PM by Romulator .) 
 
				
			 
		 
 
 
	03-23-2014, 12:08 PM  
		
	 
 
	
		lothabread 
			Member2  
	
		
			
RE: Simulate the player being dragged ? 
 
				Well i want the player to start off in a cage, have an engineer come "open" it and then "drag" the player around a corner, but im at a standstill
Spoiler below!  
//////////////////////////// void OnStart () /////////////////////// if( ScriptDebugOn ()) GiveItemFromFile ( "lantern" ,  "lantern.ent" ); SetPlayerLampOil ( 100.0f ); int i  =  0 ; i  <  10 ; i ++) GiveItemFromFile ( "tinderbox" ,  "tinderbox.ent" ); /////////////////////// SetSanityDrainDisabled ( true ); SetPlayerCrouching ( true ); SetPlayerActive ( false ); FadeOut ( 0 ); AddTimer ( "StartGame" ,  6.0f ,  "IntroSequence" ); AddTimer ( "drag" ,  3.0f ,  "Drag" ); //////////////////////// } //////////////////////// void IntroSequence ( string  & in asTimer ) AddLocalVarInt ( "iIntroPart" ,  1 ); float partSpeed  =  0.5f ; GetLocalVarInt ( "iIntroPart" )) { 1 : MovePlayerHeadPos ( 0 , - 0.9f ,  0 ,  10.0f ,  0.1f ); PlayGuiSound ( "" ,  1.0f ); StartPlayerLookAt ( "AreaIntroLook_1" ,  10.0f ,  10.0f ,  "" ); FadePlayerRollTo (- 50 ,  200 ,  200 ); partSpeed  =  0.5f ; 2 : StartPlayerLookAt ( "AreaIntroLook_1" ,  1.0f ,  1.0f ,  "" ); FadeIn ( 2.0f ); Manpig01 (); partSpeed  =  3.0f ;   3 : StartPlayerLookAt ( "AreaIntroLook_2" ,  1.0f ,  1.0f ,  "" ); partSpeed  =  5.0f ; 4 : StartPlayerLookAt ( "AreaIntroLook_3" ,  1.0f ,  1.0f ,  "" ); PlayGuiSound ( "" ,  0.7f ); FadeOut ( 5.7f ); partSpeed  =  6.0f ; 5 : TeleportPlayer ( "PlayerDrag" ); MovePlayerHeadPos (- 1.0f , - 0.45 , - 1.1 ,  10.0f ,  0.1f ); partSpeed  =  0.01f ; 6 : PlayGuiSound ( "joint_cage_slide_open" ,  1.0f ); FadeIn ( 6.0f ); partSpeed  =  8.0f ; GetLocalVarInt ( "iIntroPart" ) <  7 )     AddTimer ( "tmrIntro" ,  partSpeed ,  "IntroSequence" );      void Drag ( string  & in asTimer ) AddPlayerBodyForce ( 8000 ,  0 , - 8000 ,  false ); AddTimer ( asTimer ,  1.5f ,  "PlayerDrag" ); void Manpig01 () AddEnemyPatrolNode ( "engineer_1" ,  "PathNodeArea_1" ,  0.0f ,  "" ); AddEnemyPatrolNode ( "engineer_1" ,  "PathNodeArea_2" ,  0.0f ,  "" ); AddEnemyPatrolNode ( "engineer_1" ,  "PathNodeArea_3" ,  0.0f ,  "" ); 
 
 
 
			 
 
 
	03-24-2014, 12:56 AM  
		
	 
 
	
		Neelke 
			Senior Member26  
	
		
			
RE: Simulate the player being dragged ? 
 
				void Drag(string &in asTimer)
Marked with () what was wrong. The timer aint named like that. This below is correct.
void Drag(string &in asTimer)
 
			
			
Derp.
			
		 
 
 
	03-24-2014, 09:54 PM  
		
	 
 
	
		lothabread 
			Member2  
	
		
			
RE: Simulate the player being dragged ? 
 
				okay this is gonna sound kinda dumb, but how do i get the player to look straight up at the cieling ?
			
			
			
		 
 
 
	03-25-2014, 06:26 AM  
		
	 
 
	
		Romulator 
			Not Tech Support ;-)195  
	
		
			
RE: Simulate the player being dragged ? 
 
				I think you're better to just place a ScriptArea above you, and;
void StartPlayerLookAt ( string &  asEntityName ,  float afSpeedMul ,  float afMaxSpeed ,  string &  asAtTargetCallback );  
Where:
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
You will have to declare a StopPlayerLookAt() at some point if you use this 
Discord: Romulator#0001 
 
 
 
	03-25-2014, 07:33 AM