Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » teleport on poke
Re: teleport on poke [message #203616 is a reply to message #203566] Tue, 13 June 2006 02:56 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
I have not tested this, it compiles but i have not used it before.. I made this very quickly by changing another reb script, so there may well be additional un-needed crap in there that i did not have time/could be bothered to remove. If nothing else, it should give you a good starting point.



//script
void reb_Poke_teleport_team::Poked(GameObject *obj,GameObject *poker)
{
        Vector3 spawn_position;
	spawn_position = Get_Vector3_Parameter("Location");
	int team;
	team = Get_Int_Parameter("Player_Type");
	if (CheckPlayerType(poker,team))
	{
		return;
	}
	int x = Get_Int_Parameter("Object_ID");
	if (x)
	{
		GameObject *gotoObject = Commands->Find_Object(x);
		Vector3 gotoLocation = Commands->Get_Position(gotoObject);
		Commands->Set_Position(poker,gotoLocation);
	}
	else
		Commands->Set_Position(poker,spawn_position);

//registrant
ScriptRegistrant<reb_Poke_teleport_team> reb_Poke_teleport_team_Registrant("reb_Poke_teleport_team","Location:vector3,Object_ID=0:int,Player_Type:int");





//for the .h file
class reb_Poke_teleport_team : public ScriptImpClass {
	void poked(GameObject *obj,GameObject *poker);
};



[Updated on: Tue, 13 June 2006 03:08]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SSAOW 1.5/Scripts.dll Problem
Next Topic: Renegade Destroyed Buildings
Goto Forum:
  


Current Time: Sat Sep 28 15:19:06 MST 2024

Total time taken to generate the page: 0.01083 seconds