| 
		
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				I believe you forgot to copy in the rest of the code. void MoveEntityToEntity(string &in asEntity, string &in asDestEntity, float afSpace, float afFreq){
 if(GetLocalVarInt("Moving"+asEntity) == 1)
 {
 AddDebugMessage("Object already moving", false);
 return;
 }
 
 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);
 if(afAmountX < 0)
 {
 SetLocalVarFloat("MoveSpaceX_"+asEntity, -afSpace);
 }
 
 float afAmountY = GetEntityPosY(asDestEntity)-GetEntityPosY(asEntity);
 SetLocalVarFloat("MoveAmountY_"+asEntity, MathSqrt(MathPow(afAmountY, 2)));
 SetLocalVarFloat("MoveSpaceY_"+asEntity, afSpace);
 if(afAmountY < 0)
 {
 SetLocalVarFloat("MoveSpaceY_"+asEntity, -afSpace);
 }
 
 float afAmountZ = GetEntityPosZ(asDestEntity)-GetEntityPosZ(asEntity);
 SetLocalVarFloat("MoveAmountZ_"+asEntity, MathSqrt(MathPow(afAmountZ, 2)));
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, afSpace);
 if(afAmountZ < 0)
 {
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, -afSpace);
 }
 
 AddTimer(asEntity, 0.0f, "MoveObjectTimer");
 }
 
 void MoveEntityOnAxis(string &in asEntity, float afAmountX, float afAmountY, float afAmountZ, float afSpace, float afFreq)
 {
 if(GetLocalVarInt("Moving"+asEntity) == 1)
 {
 AddDebugMessage("Object already moving", false);
 return;
 }
 
 SetLocalVarFloat("MoveFreq_"+asEntity, afFreq);
 
 SetLocalVarFloat("MoveSpace_"+asEntity, afSpace);
 
 SetLocalVarFloat("MoveAmountX_"+asEntity, MathSqrt(MathPow(afAmountX, 2)));
 SetLocalVarFloat("MoveSpaceX_"+asEntity, afSpace);
 if(afAmountX < 0)
 {
 SetLocalVarFloat("MoveSpaceX_"+asEntity, -afSpace);
 }
 
 SetLocalVarFloat("MoveAmountY_"+asEntity, MathSqrt(MathPow(afAmountY, 2)));
 SetLocalVarFloat("MoveSpaceY_"+asEntity, afSpace);
 if(afAmountY < 0)
 {
 SetLocalVarFloat("MoveSpaceY_"+asEntity, -afSpace);
 }
 
 SetLocalVarFloat("MoveAmountZ_"+asEntity, MathSqrt(MathPow(afAmountZ, 2)));
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, afSpace);
 if(afAmountZ < 0)
 {
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, -afSpace);
 }
 
 AddTimer(asEntity, 0.0f, "MoveObjectTimer");
 }
 
 void MoveObjectTimer(string &in asTimer)
 {
 SetLocalVarInt("Moving"+asTimer, 1);
 
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer)+GetLocalVarFloat("MoveSpaceX_"+asTimer), GetEntityPosY(asTimer), GetEntityPosZ(asTimer));
 AddLocalVarFloat("MoveAmountX_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountX_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountY_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer), GetEntityPosY(asTimer)+GetLocalVarFloat("MoveSpaceY_"+asTimer), GetEntityPosZ(asTimer));
 AddLocalVarFloat("MoveAmountY_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountY_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountY_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountZ_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer), GetEntityPosY(asTimer), GetEntityPosZ(asTimer)+GetLocalVarFloat("MoveSpaceZ_"+asTimer));
 AddLocalVarFloat("MoveAmountZ_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountZ_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountZ_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) == 0 && GetLocalVarFloat("MoveAmountY_"+asTimer) == 0 && GetLocalVarFloat("MoveAmountZ_"+asTimer) == 0)
 {
 SetLocalVarInt("Moving"+asTimer, 0);
 OnArrival(asTimer);
 return;
 }
 
 AddTimer(asTimer, GetLocalVarFloat("MoveFreq_"+asTimer), "MoveObjectTimer");
 }
 
 void OnArrival(string &in asEntity)
 {
 
 }
 
This just has to be in your scriptfile somewhere
			
 Trying is the first step to success. |  |  
	| 05-10-2015, 07:45 PM |  |  
	
		| Amnesiaplayer   Senior Member
 
 Posts: 539
 Threads: 105
 Joined: Jun 2014
 Reputation: 
0
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				 (05-10-2015, 07:45 PM)FlawlessHappiness Wrote:  I believe you forgot to copy in the rest of the code.
 
 void MoveEntityToEntity(string &in asEntity, string &in asDestEntity, float afSpace, float afFreq){
 if(GetLocalVarInt("Moving"+asEntity) == 1)
 {
 AddDebugMessage("Object already moving", false);
 return;
 }
 
 Now I get a lot of Errors... Do I need to fill Everything in the script either?! :O
 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);
 if(afAmountX < 0)
 {
 SetLocalVarFloat("MoveSpaceX_"+asEntity, -afSpace);
 }
 
 float afAmountY = GetEntityPosY(asDestEntity)-GetEntityPosY(asEntity);
 SetLocalVarFloat("MoveAmountY_"+asEntity, MathSqrt(MathPow(afAmountY, 2)));
 SetLocalVarFloat("MoveSpaceY_"+asEntity, afSpace);
 if(afAmountY < 0)
 {
 SetLocalVarFloat("MoveSpaceY_"+asEntity, -afSpace);
 }
 
 float afAmountZ = GetEntityPosZ(asDestEntity)-GetEntityPosZ(asEntity);
 SetLocalVarFloat("MoveAmountZ_"+asEntity, MathSqrt(MathPow(afAmountZ, 2)));
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, afSpace);
 if(afAmountZ < 0)
 {
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, -afSpace);
 }
 
 AddTimer(asEntity, 0.0f, "MoveObjectTimer");
 }
 
 void MoveEntityOnAxis(string &in asEntity, float afAmountX, float afAmountY, float afAmountZ, float afSpace, float afFreq)
 {
 if(GetLocalVarInt("Moving"+asEntity) == 1)
 {
 AddDebugMessage("Object already moving", false);
 return;
 }
 
 SetLocalVarFloat("MoveFreq_"+asEntity, afFreq);
 
 SetLocalVarFloat("MoveSpace_"+asEntity, afSpace);
 
 SetLocalVarFloat("MoveAmountX_"+asEntity, MathSqrt(MathPow(afAmountX, 2)));
 SetLocalVarFloat("MoveSpaceX_"+asEntity, afSpace);
 if(afAmountX < 0)
 {
 SetLocalVarFloat("MoveSpaceX_"+asEntity, -afSpace);
 }
 
 SetLocalVarFloat("MoveAmountY_"+asEntity, MathSqrt(MathPow(afAmountY, 2)));
 SetLocalVarFloat("MoveSpaceY_"+asEntity, afSpace);
 if(afAmountY < 0)
 {
 SetLocalVarFloat("MoveSpaceY_"+asEntity, -afSpace);
 }
 
 SetLocalVarFloat("MoveAmountZ_"+asEntity, MathSqrt(MathPow(afAmountZ, 2)));
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, afSpace);
 if(afAmountZ < 0)
 {
 SetLocalVarFloat("MoveSpaceZ_"+asEntity, -afSpace);
 }
 
 AddTimer(asEntity, 0.0f, "MoveObjectTimer");
 }
 
 void MoveObjectTimer(string &in asTimer)
 {
 SetLocalVarInt("Moving"+asTimer, 1);
 
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer)+GetLocalVarFloat("MoveSpaceX_"+asTimer), GetEntityPosY(asTimer), GetEntityPosZ(asTimer));
 AddLocalVarFloat("MoveAmountX_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountX_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountY_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer), GetEntityPosY(asTimer)+GetLocalVarFloat("MoveSpaceY_"+asTimer), GetEntityPosZ(asTimer));
 AddLocalVarFloat("MoveAmountY_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountY_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountY_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountZ_"+asTimer) != 0)
 {
 SetEntityPos(asTimer, GetEntityPosX(asTimer), GetEntityPosY(asTimer), GetEntityPosZ(asTimer)+GetLocalVarFloat("MoveSpaceZ_"+asTimer));
 AddLocalVarFloat("MoveAmountZ_"+asTimer, -GetLocalVarFloat("MoveSpace_"+asTimer));
 if(GetLocalVarFloat("MoveAmountZ_"+asTimer) < 0)
 {
 SetLocalVarFloat("MoveAmountZ_"+asTimer, 0);
 }
 }
 
 if(GetLocalVarFloat("MoveAmountX_"+asTimer) == 0 && GetLocalVarFloat("MoveAmountY_"+asTimer) == 0 && GetLocalVarFloat("MoveAmountZ_"+asTimer) == 0)
 {
 SetLocalVarInt("Moving"+asTimer, 0);
 OnArrival(asTimer);
 return;
 }
 
 AddTimer(asTimer, GetLocalVarFloat("MoveFreq_"+asTimer), "MoveObjectTimer");
 }
 
 void OnArrival(string &in asEntity)
 {
 
 }
 
This just has to be in your scriptfile somewhere
 
Oh, So I have to paste it into my script?! lol, K I paste it at the end    
				
(This post was last modified: 05-10-2015, 08:05 PM by Amnesiaplayer.)
 |  |  
	| 05-10-2015, 08:03 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				Awesome. Now everything should work.
			 
 Trying is the first step to success. |  |  
	| 05-10-2015, 08:27 PM |  |  
	
		| Amnesiaplayer   Senior Member
 
 Posts: 539
 Threads: 105
 Joined: Jun 2014
 Reputation: 
0
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				 (05-10-2015, 08:27 PM)FlawlessHappiness Wrote:  Awesome. Now everything should work. 
Nope.. It  doesn't work ;( Now it gives me like, 1 million errors! most of them actually say like No matching signatures etc    |  |  
	| 05-10-2015, 08:30 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				Then delete everything you added from my script.
 It may be because you don't have 1.3 but it seems my solution is too complicated to try out right now.
 Try studying the MoveObject type instead, and how FrictionalGames did.
 
 Trying is the first step to success. |  |  
	| 05-10-2015, 08:36 PM |  |  
	
		| Amnesiaplayer   Senior Member
 
 Posts: 539
 Threads: 105
 Joined: Jun 2014
 Reputation: 
0
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				 (05-10-2015, 08:36 PM)FlawlessHappiness Wrote:  Then delete everything you added from my script.
 It may be because you don't have 1.3 but it seems my solution is too complicated to try out right now.
 Try studying the MoveObject type instead, and how FrictionalGames did.
 
Or I just something else ;( Like rocks next to the place where I need to cover.. 
But how can I get 1.3 then?! I installed it like 3 times, and it still doesn't count... damn... But I think I hate 1.3, Since the Human skull pile things _2 is glitchy...
			 |  |  
	| 05-10-2015, 08:39 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 |  |  
	| 05-10-2015, 09:01 PM |  |  
	
		| Amnesiaplayer   Senior Member
 
 Posts: 539
 Threads: 105
 Joined: Jun 2014
 Reputation: 
0
 |  |  
	| 05-10-2015, 09:14 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: It doesn't work, maybe impossible?! 
 
				Oh. Oh well, try making a moving object and see if you can get it working.
			 
 Trying is the first step to success. |  |  
	| 05-10-2015, 10:48 PM |  |  |