• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Introducing Dokkio, a new service from the creators of PBworks. Find and manage the files you've stored in Dropbox, Google Drive, Gmail, Slack, and more. Try it for free today.


Tractor Beam

Page history last edited by aodendaal 7 years, 8 months ago


by Vorus


This is a code snippet that must be added to a mission script.


"Here's a piece of code that will allow you to "tractor" another object around. This was first used by Mike, as far as I know, so I didn't invent the idea. Anyway, you'd need something to trigger the "tractorRdy" variable, and a trigger to turn it off, like when you get to a destination, but this will do the basic job."



<if_variable name="tractorRdy" comparator="=" value="1"/> 

<if_variable name="tractoring" comparator="!=" value="1"/> 

<if_distance name1="OBJECT" name2="player" comparator="<=" value="220"/> 

<warning_popup_message message="Tractor beam locked on" consoles="W"/> 

<set_variable name="tractoring" value="1"/> 




<if_variable name="tractoring" comparator="=" value="1"/> 

<!-- This makes it so that the tractor only turns on when you are facing away from your target --> 

<if_distance name1="OBJECT" name2="player" comparator=">" value="220"/> 

<set_relative_position name1="player" name2="OBJECT" angle="180" distance="220"/> 





Comments (0)

You don't have permission to comment on this page.