Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ryleyra

Registered:
Posts: 3,007
Reply with quote  #1 
I've implemented a tractor beam in a mission I'm working on, and thought I would post it here as a stub that others can use in their missions. I'm pretty sure a tractor beam function has been implemented by others before, but in this case I've managed to create a graphic. The graphic consists of a custom mesh, which is basically just a wedge shape pointing at the tractored ship, and the "greenBullet" texture in stock Artemis.

Untitled.png 

Yes, that is the Enterprise towing the Battlestar Galactica.

The image doesn't show the rotation of the graphic very well, it is spinning fast enough that there is a double image, like the tractor beam of the base. It looks quite impressive in action.

To use this, just download the zip file and install in your Artemis folder. It will add the "tractorbeam.dxs" mesh to the dat folder. You can move it to another folder if you like. At the top level of the installation will be a file called "tractor_beam_stub.txt". It contains the code that you will want to copy into your mission.

You should define the code for each ship you wish to tractor. The tractoring ship will activate the tractor by flying to the other named ship and coming to a stop with shields down. If the other ship is less than 600 units away, the tractor beam will activate. The other ship will also have to be moving at less than half speed. (not at Warp) To shut off the tractor beam, simply raise shields.

 
Attached Files
zip TractorBeam.zip (1.76 KB, 25 views)

Newcommerin

Avatar / Picture

Registered:
Posts: 190
Reply with quote  #2 
That is awesome!

Will try it in my next mission!!!

__________________
Sorry, English is not my native language, I am German.
(* I wish I would live in America, I wish I would... *)
Any mistakes you can find, you can keep and with the spelling mistakes you can cook you an alphabet soup.

My Artemis Homepage: https://star-ship-academy.jimdo.com/
locqust

Avatar / Picture

Registered:
Posts: 70
Reply with quote  #3 
That's brilliant! I've been using tractor beams in a couple of missions but never thought of using a mesh to create a visual effect.
ryleyra

Registered:
Posts: 3,007
Reply with quote  #4 
I suppose I could have used a double mesh, with two "arms" directly opposite each other, but if the rotation speed is fast enough, persistence of vision makes it look like that, and translucent besides. Basically, the tractor beam is just a long, narrow cone. The majority of it has to be sliced off in order to make it transparent, so it's just two of the triangular faces of that cone, with a texture on both side. (So the tractored ship can see it too)

It was easy enough to make, but I took some time to fiddle with scaling and get it just right. It should work fine with the stock ships, or any custom ships of about the same size. I'm sure anybody could have done the same thing, but here I've managed to do most of the work. [biggrin] The "greenBullet" is also perfect for the texture. I'm fairly certain it's part of the stock installation, but do let me know if it isn't.
HaydenBarca

Registered:
Posts: 198
Reply with quote  #5 
Thanks for sharing this.  So, it looks like the you had to set the tractor beam to auto lock when the two ships are stopped, with shields off, and within 600km.  I take it that other methods like listen-for-keystrokes didn't work well?
ryleyra

Registered:
Posts: 3,007
Reply with quote  #6 
Yeah, I was trying to avoid using keybinds. The code stub could be modified to make use of a keybind or Comms button, though.
HaydenBarca

Registered:
Posts: 198
Reply with quote  #7 
Building on ryleyra's stub, I wanted to make tractor beaming a full-team experience (content for everyone!). I'm still testing and cleaning up the code, but here are the roles for everyone:
  • Helm: moving under 25% impulse and shields down
  • Engineering: move Primary Beam energy to zero (called "shifting to tractor beam mode" in the pop-up)
  • Comms: custom comms button to radio ship "Prepare to be towed"
  • Science: scan a generic mesh scan point (since you can't scan neutral ships) to "find a good tow point" on the damaged ship
  • Weapons: target the ship to be towed
If any of those parts are not done, the tractor beam does not initiate.  If weapons goes before engineering, they might fire on the ship to be towed.  Each position gets a pop-up message to notify them of their role when they're near a towable ship.  And in case someone doesn't read it on the first go, they will get pop-up reminders every 60 seconds until the tractor beam is started or they leave the area.

Once they're being towed, it will end if the towing ship enters Warp (requiring Engineering to boost Impulse to get anywhere fast), raises Shields, or raises energy on Primary Beam ("switching beams to destroy").  And the towed ship complains if they do :-)  "What happened? We're not moving anymore! Don't leave us behind!".  Unfortunately, you need 14 events for each tower-towed pair, but I'm trying to write it such that Find and Replace works well.  Will post once it's smooth.

For the record, the green bullet.dxs is part of the stock install, so no problems there.  Unfortunately, <copy_object_property property="angle" player_slot1="0" name2=" " /> does not work with the player_slot reference in 2.7.5, so I had to go back to names for player ships.
HaydenBarca

Registered:
Posts: 198
Reply with quote  #8 
Here's the script stub for the full-team tractor beam experience and rescue, in case it's helpful to anyone.  I tried to comment everything you'd need to incorporate it into your own script, but let me know if you have any questions.  Thanks to ryleyra's initial work and inspiration.

 
Attached Files
zip TeamTractorBeamRescue.zip (4.29 KB, 3 views)

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.