Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » how do i, teleports
Re: how do i, teleports [message #373114 is a reply to message #373112] Sun, 22 February 2009 22:53 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 don't know if the script already exists, but it could be done with a script zone, and attach a script that on the ::Entered event checks the preset name of the object entering it. If it isn't a preset name that you want to be useing the tunnels, then teleport it to defined locations.
Maybe something like this:

void Vendetta_sniper_tele_zone::Entered(GameObject *obj,GameObject *enter){
if(((strcmp(Commands->Get_Preset_Name(enter),"sniper_preset_name1"))== 0) || ((strcmp(Commands->Get_Preset_Name(enter),"sniper_preset_name2"))== 0)){
//do nothing because they are a allowed sniper preset
}
else{
//they are not allowed to be there, so teleport them
Vector3 NewPosition;
//Have the new location as a user input param
NewPosition = Get_Vector3_Parameter("Location");
Commands->Set_Position(enter,NewPosition);
}
}



 
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: Serial Hashing, How Secure?
Next Topic: Invisible animation
Goto Forum:
  


Current Time: Sat Jan 11 15:48:25 MST 2025

Total time taken to generate the page: 0.01237 seconds