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