Author Topic: Rotating Subobjects?  (Read 1092 times)

0 Members and 1 Guest are viewing this topic.

Is there a limit to these?

I have been trying to make a ship with several rotating bits... but I seem to be only able to have one rotate!

I put the following in:

$special=subsystem
$name=habitat
$rotate=10

into a 'ring' around the main hull and set it to rotate arounf the Z axis in PCS. I then added the habitat subsystem into the ship table, and it worked fine. The thing rotated exactly as I expected it to. Hooray!

Then, I wanted to have a gatling gun on the front. I read somewhere that putting '$pbank=0' would tie the rotation of the gun into firing the relevant pbank....so I thought I would get it to rotate first, and then worry about the link.

So, I called that subobject 'gun' and did EXACTLY as I had done for the habitat object.

$special=subsystem
$name=gun
$rotate=2

went into the subsystem in the POF, and I added the subsystem in the table. The habitat still spun nicely...but the gun refused to shift!

Can youhave more than 1 rotating subsytem?

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
You can certainly have more than one rotating system.  And you are correct that $pbank=0 will cause the gun to rotate.  But, based on your description, you don't appear to be actually using $pbank=0.

 
As an additional confusion...I removed the pbank0 line, and expected the part to rotate..... but it didn't :(

I was expecting to see the thing spinning round ( to confirm it worked ) and then add in the $pbank0 command to link it to the guns. The code I posted was my start point. I should have seen the thing revolving constantly in the same way as the 'habitat' section was.

Only once I had that working was I going to add the extra line. I would then know it was working, and could tell if the pbank0 line was having an effect. Never got that far!

If it won't turn full stop, the linking to the gun bank was pointless...and would only have got me even more confused!

What could be causing the part to not rotate?

  
Well.... I put the pbank line into the habitat submodel...and it only turns when the trigger is pressed. This is working exactly as it should. Try as I might, though, I cannot get the other submodel to rotate....period!

IT is a submodel of detail-0.....it has the code to rotate in it..code that is IDENTICAL to the working code in the habitat ring. IT is set to rotate in Modelview...and when you ask it to rotate the rotating bits...it rotates! Only time it fails to revolve is when you actually view it in game....GGRrrrrr :mad: