TRACTOR BEAM
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."
|
<event>
<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"/>
</event>
<event>
<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"/>
</event>
|
Comments (0)
You don't have permission to comment on this page.