Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » AI Helpers
Re: AI Helpers [message #257828 is a reply to message #257744] Tue, 08 May 2007 09:03 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
a100 wrote on Mon, 07 May 2007 23:56

Well you cud script in a follow script which would be something like
Commands-> Set_Position(obj,Commands->Get_Position(Get_GameObj(Get_Int_Parameter("Player_ID"))))


or if you wanted to get the helper to follow where they face

	
	int ID = Get_Int_Parameter("ID")
	Vector3 pos = Commands->Get_Position(Get_GameObj(ID));
	float f = Commands->Get_Facing(Get_GameObj(ID)) +180;
		pos.X += -1.5*(cos(f*(PI / 180)));  // 1.5 or any other distance 
		pos.Y += -1.5*(sin(f*(PI / 180)));
        	Commands->Set_Position(obj,pos);



Hmm, does this make the charater "jerk" towards you? or does it run smoothy?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Requesting Map Maker
Next Topic: Teleport Failure
Goto Forum:
  


Current Time: Tue Jan 21 08:49:38 MST 2025

Total time taken to generate the page: 0.01732 seconds