FlawlessHappiness 
			Posting Freak171  
	
		
			
Flawless' thread of inspiration 
 
				Hi.
Sometimes I get a rush of inspiration, but never really finish anything.
Then I have a prototype going to waste.
I figured I'd like to share whatever I come up with.
You're allowed to use my concepts in any mod you make as long as you credit me 
Parkour Preview 
Wallrunning and high jumping
Frictional Science Preview 
Inspired by the Portal series.
Confusion Preview 
Things change when the magic door closes.
Moving an entity with scripting [Animated]  VERY EXPERIMENTAL
Here, I made a script on how to move a static entity with the SetEntityPos scriptline.
WARNING: Move only 1 object at a time. Can cause lag.
Spoiler below!  
This has to be in your scriptfile:
void MoveEntityToEntity ( string  & in asEntity ,  string  & in asDestEntity ,  float afSpace ,  float afFreq ) GetLocalVarInt ( "Moving" + asEntity ) ==  1 ) AddDebugMessage ( "Object already moving" ,  false ); SetLocalVarFloat ( "MoveFreq_" + asEntity ,  afFreq ); SetLocalVarFloat ( "MoveSpace_" + asEntity ,  afSpace ); float afAmountX  =  GetEntityPosX ( asDestEntity )- GetEntityPosX ( asEntity ); SetLocalVarFloat ( "MoveAmountX_" + asEntity ,  MathSqrt ( MathPow ( afAmountX ,  2 ))); SetLocalVarFloat ( "MoveSpaceX_" + asEntity ,  afSpace ); afAmountX  <  0 ) SetLocalVarFloat ( "MoveSpaceX_" + asEntity , - afSpace ); float afAmountY  =  GetEntityPosY ( asDestEntity )- GetEntityPosY ( asEntity ); SetLocalVarFloat ( "MoveAmountY_" + asEntity ,  MathSqrt ( MathPow ( afAmountY ,  2 ))); SetLocalVarFloat ( "MoveSpaceY_" + asEntity ,  afSpace ); afAmountY  <  0 ) SetLocalVarFloat ( "MoveSpaceY_" + asEntity , - afSpace ); float afAmountZ  =  GetEntityPosZ ( asDestEntity )- GetEntityPosZ ( asEntity ); SetLocalVarFloat ( "MoveAmountZ_" + asEntity ,  MathSqrt ( MathPow ( afAmountZ ,  2 ))); SetLocalVarFloat ( "MoveSpaceZ_" + asEntity ,  afSpace ); afAmountZ  <  0 ) SetLocalVarFloat ( "MoveSpaceZ_" + asEntity , - afSpace ); AddTimer ( asEntity ,  0.0f ,  "MoveObjectTimer" ); void MoveEntityOnAxis ( string  & in asEntity ,  float afAmountX ,  float afAmountY ,  float afAmountZ ,  float afTime ) GetLocalVarInt ( "Moving" + asEntity ) ==  1 ) AddDebugMessage ( "Object already moving" ,  false ); SetLocalVarFloat ( "MoveSpace_" + asEntity ,  0.01 ); afAmountX  !=  0 ) SetLocalVarFloat ( "MoveFreqX_" + asEntity , ( afTime / afAmountX )* GetLocalVarFloat ( "MoveSpace_" + asEntity )); afAmountY  !=  0 ) SetLocalVarFloat ( "MoveFreqY_" + asEntity , ( afTime / afAmountY )* GetLocalVarFloat ( "MoveSpace_" + asEntity )); afAmountZ  !=  0 ) SetLocalVarFloat ( "MoveFreqZ_" + asEntity , ( afTime / afAmountZ )* GetLocalVarFloat ( "MoveSpace_" + asEntity )); AddDebugMessage ( "X = " + GetLocalVarFloat ( "MoveFreqX_" + asEntity ),  false ); AddDebugMessage ( "Y = " + GetLocalVarFloat ( "MoveFreqY_" + asEntity ),  false ); AddDebugMessage ( "Z = " + GetLocalVarFloat ( "MoveFreqZ_" + asEntity ),  false ); afAmountX  !=  0 ) SetLocalVarFloat ( "MoveAmountX_" + asEntity ,  MathSqrt ( MathPow ( afAmountX ,  2 ))); SetLocalVarFloat ( "MoveSpaceX_" + asEntity ,  0.01 ); afAmountX  <  0 ) SetLocalVarFloat ( "MoveSpaceX_" + asEntity , - 0.01 ); AddDebugMessage ( "MoveX = " + GetLocalVarFloat ( "MoveSpace_" + asEntity ),  false ); afAmountY  !=  0 ) SetLocalVarFloat ( "MoveAmountY_" + asEntity ,  MathSqrt ( MathPow ( afAmountY ,  2 ))); SetLocalVarFloat ( "MoveSpaceY_" + asEntity ,  0.01 ); afAmountY  <  0 ) SetLocalVarFloat ( "MoveSpaceY_" + asEntity , - 0.01 ); afAmountZ  !=  0 ) SetLocalVarFloat ( "MoveAmountZ_" + asEntity ,  MathSqrt ( MathPow ( afAmountZ ,  2 ))); SetLocalVarFloat ( "MoveSpaceZ_" + asEntity ,  0.01 ); afAmountZ  <  0 ) SetLocalVarFloat ( "MoveSpaceZ_" + asEntity , - 0.01 ); AddTimer ( asEntity ,  0.0f ,  "MoveObjectTimerX" ); AddTimer ( asEntity ,  0.0f ,  "MoveObjectTimerY" ); AddTimer ( asEntity ,  0.0f ,  "MoveObjectTimerZ" ); void MoveObjectTimerX ( string  & in asTimer ) SetLocalVarInt ( "Moving" + asTimer ,  1 ); GetLocalVarFloat ( "MoveAmountX_" + asTimer ) !=  0 ) SetEntityPos ( asTimer ,  GetEntityPosX ( asTimer )+ GetLocalVarFloat ( "MoveSpaceX_" + asTimer ),  GetEntityPosY ( asTimer ),  GetEntityPosZ ( asTimer )); AddLocalVarFloat ( "MoveAmountX_" + asTimer , - GetLocalVarFloat ( "MoveSpace_" + asTimer )); GetLocalVarFloat ( "MoveAmountX_" + asTimer ) <  0 ) SetLocalVarFloat ( "MoveAmountX_" + asTimer ,  0 ); AddTimer ( asTimer ,  GetLocalVarFloat ( "MoveFreqX_" + asTimer ),  "MoveObjectTimerX" ); void MoveObjectTimerY ( string  & in asTimer ) SetLocalVarInt ( "Moving" + asTimer ,  1 ); GetLocalVarFloat ( "MoveAmountY_" + asTimer ) !=  0 ) SetEntityPos ( asTimer ,  GetEntityPosX ( asTimer ),  GetEntityPosY ( asTimer )+ GetLocalVarFloat ( "MoveSpaceY_" + asTimer ),  GetEntityPosZ ( asTimer )); AddLocalVarFloat ( "MoveAmountY_" + asTimer , - GetLocalVarFloat ( "MoveSpace_" + asTimer )); GetLocalVarFloat ( "MoveAmountY_" + asTimer ) <  0 ) SetLocalVarFloat ( "MoveAmountY_" + asTimer ,  0 ); AddTimer ( asTimer ,  GetLocalVarFloat ( "MoveFreqY_" + asTimer ),  "MoveObjectTimerY" ); void MoveObjectTimerZ ( string  & in asTimer ) SetLocalVarInt ( "Moving" + asTimer ,  1 ); GetLocalVarFloat ( "MoveAmountZ_" + asTimer ) !=  0 ) SetEntityPos ( asTimer ,  GetEntityPosX ( asTimer ),  GetEntityPosY ( asTimer ),  GetEntityPosZ ( asTimer )+ GetLocalVarFloat ( "MoveSpaceZ_" + asTimer )); AddLocalVarFloat ( "MoveAmountZ_" + asTimer , - GetLocalVarFloat ( "MoveSpace_" + asTimer )); GetLocalVarFloat ( "MoveAmountZ_" + asTimer ) <  0 ) SetLocalVarFloat ( "MoveAmountZ_" + asTimer ,  0 ); AddTimer ( asTimer ,  GetLocalVarFloat ( "MoveFreqZ_" + asTimer ),  "MoveObjectTimerZ" ); MoveObjectCheck ( asTimer ); void MoveObjectCheck ( string  & in asEntity ) GetLocalVarFloat ( "MoveAmountX_" + asEntity ) ==  0  &&  GetLocalVarFloat ( "MoveAmountY_" + asEntity ) ==  0  &&  GetLocalVarFloat ( "MoveAmountZ_" + asEntity ) ==  0 ) SetLocalVarInt ( "Moving" + asEntity ,  0 ); OnArrival ( asEntity ); void OnArrival ( string  & in asEntity ) 
To make an entity move to a specific entity, write:
MoveEntityToEntity ( string  & in asEntity ,  string  & in asDestEntity ,  float afSpace ,  float afFreq )  
asEntity  = The entity to move.
asDestEntity  = The entity to move towards.
afAmountX   = The amount to move on the X-axis
Can be both positive and negative.
afAmountY  = The amount to move on the Y-axis
Can be both positive and negative.
afAmountZ  = The amount to move on the Z-axis
Can be both positive and negative.
afSpace  = The amount of space the object moves with, per frequence. 
Must be above 0.
If used with a frequence at 0.01f:
0.01f is kinda slow.
0.02f is quicker.
afFreq  =  How often the object moves. 
Must be above 0.
0.01f looks really smooth.
To make an entity move a specific amount, write:
MoveEntityOnAxis ( string  & in asEntity ,  float afAmountX ,  float afAmountY ,  float afAmountZ ,  float afTime );  
asEntity  = The entity to move.
afAmountX   = The amount to move on the X-axis
Can be both positive and negative.
afAmountY  = The amount to move on the Y-axis
Can be both positive and negative.
afAmountZ  = The amount to move on the Z-axis
Can be both positive and negative.
afTime  = Duration of animation in seconds.
When the entity has moved, the function OnArrival(string &in asEntity) calls. 
void OnArrival ( string  & in asEntity )  
asEntity  = The entity that moved.
Variables used in this script: 
float "MoveFreq_"+asObject
float "MoveAmountX_"+asObject
float "MoveAmountY_"+asObject
float "MoveAmountZ_"+asObject
float "MoveSpaceX_"+asObject
float "MoveSpaceY_"+asObject
float "MoveSpaceZ_"+asObject
int "Moving"+asObject
 
 
 
Scary heartbeat screen effects 
A heartbeat script, that uses both screen effects and the heartbeat sound.
Spoiler below!  
////////////// void HeartBeat ( string  & in asTimer ) GetLocalVarInt ( "Heartbeat" ) ==  1 ) asTimer  ==  "HeartBeat_1" ) PlaySoundAtEntity ( "heartbeat" ,  "sanity_heartbeat.snt" ,  "Player" ,  0.0f ,  false ); AddTimer ( "Beat" ,  0.05f ,  "HeartBeat" ); AddTimer ( "Beat" ,  0.35f ,  "HeartBeat" ); AddDebugMessage ( "EXECUTE TIMER" ,  false ); AddTimer ( "HeartBeat_1" ,  2 ,  "HeartBeat" ); asTimer  ==  "Beat" ) FadePlayerAspectMulTo ( 1.25f ,  20 ); FadeRadialBlurTo ( 0.05f ,  20 ); FadePlayerFOVMulTo ( 0.8f ,  30 ); AddTimer ( "Beat_end" ,  0.05f ,  "HeartBeat" ); asTimer  ==  "Beat_end" ) FadePlayerAspectMulTo ( 1.0f ,  1 ); FadePlayerFOVMulTo ( 1.0f ,  0.75f ); FadeRadialBlurTo ( 0.0f ,  1 ); //HEART BEAT END// 
 
 
 
			 
			
			
Trying is the first step to success.
			
		 
 
 
	04-22-2015, 12:31 AM  
		
	 
 
	
		MrBehemoth 
			Senior Member40  
	
		
			
RE: Flawless' thread of inspiration 
 
				Cool work! I like to see experimental modding. Got me thinking about portals and how they could be used. I have an idea for shooting a portal anywhere, instead of on set points... But I've got too much to do already. 
 
 
 
	04-22-2015, 10:14 PM  
		
	 
 
	
		FlawlessHappiness 
			Posting Freak171  
	
		
			
RE: Flawless' thread of inspiration 
 
				 (04-22-2015, 10:14 PM) MrBehemoth Wrote:  
Sounds cool! Something about creating entities I guess...
			
 
			
			
Trying is the first step to success.
			
		 
 
 
	04-22-2015, 10:17 PM  
		
	 
 
	
		FlawlessHappiness 
			Posting Freak171  
	
		
			
RE: Flawless' thread of inspiration 
 
				New thing out.VIDEO 
			
			
Trying is the first step to success.
			
		 
 
 
	04-23-2015, 08:21 PM  
		
	 
 
	
		Streetboat 
			Posting Freak56  
	
		
			
RE: Flawless' thread of inspiration 
 
				little did alexander know, daniel can always get away from his servants with a sick wall-run into a backflip move.
			
			
			
 
 
 
	04-23-2015, 08:52 PM  
		
	 
 
	
		FlawlessHappiness 
			Posting Freak171  
	
		
			
RE: Flawless' thread of inspiration 
 
				 (04-23-2015, 08:52 PM) Streetboat Wrote:  
And thus Daniel Lantern-ran his way through the halls of Brennenburg.
			
 
			
			
Trying is the first step to success.
			
		 
 
 
	04-23-2015, 10:59 PM  
		
	 
 
	
		Slanderous 
			Posting Freak63  
	
		
			
RE: Flawless' thread of inspiration 
 
				Nice dude! That looks awesome.
			
			
			
			
		 
 
 
	04-24-2015, 03:04 PM  
		
	 
 
	
		HumiliatioN 
			Posting Freak18  
	
		
			
RE: Flawless' thread of inspiration 
 
				Wow, really original ideas you got there, keep up the great work! 
“Life is a game, play it” 
			
		 
 
 
	04-24-2015, 04:56 PM  
		
	 
 
	
		FlawlessHappiness 
			Posting Freak171  
	
		
			
RE: Flawless' thread of inspiration 
 
				New script!
			
			
Trying is the first step to success.
			
		 
 
 
	05-04-2015, 04:59 PM  
		
	 
 
	
		Mudbill 
			Muderator179  
	
		
			
RE: Flawless' thread of inspiration 
 
				Doesn't 
void PlaceEntityAtEntity ( string  & in asName ,  string  & in asTargetEntity ,  string  & in asTargetBodyName ,  bool abUseRotation );  
 do the same? Or does this actually animate the entity moving towards another entity?
			
 
 
 
	05-04-2015, 05:41 PM