Sign up Calendar Latest Topics

  Author   Comment  

Posts: 15
Reply with quote  #1 
I'm trying to implement a command in a script to reset the player's ship to the Y=0 plane. I can move them by setting the "PositionY" property, but I also want to be able to specify that they are not moving up or down. I've tried playing around with the "pitch" and "DeltaY" properties, but I can't get them to work. Could someone please share the code snippet I need? It's a 2.4 version script, if that makes any difference.
Xavier Wise

Posts: 1,042
Reply with quote  #2 
You could track whether y is greater than or less than the value you reset it to (so in this case it would be 'if y>0, set position y to 0'). You'd have to script it in two separate events, one for y>0 and one for y<0. Personally, I'd set it to > or < 10 to give a bit of leeway and avoid funny things happening in game.

By doing this, the script would force players to remain on the desired plane (+/-10), however wouldn't reset the climb or dive. The players must do that themselves I believe. A popup message to helm could act as a prompt.

Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
Mike Substelny

Avatar / Picture

Posts: 2,179
Reply with quote  #3 
I'm pretty sire Xavier is right. Even if you force the pitch to zero, if the players have a control (like a joystick) set to climb or dive that control will immediately override your mission script. You would need to physically move their control.
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.