Author Topic: question about the animation code  (Read 2545 times)

0 Members and 1 Guest are viewing this topic.

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
question about the animation code
I have a fighter which has an external rotating Gatling style weapon in its own weapon primary bank (gunbank3).  Using the animation code I have achieved a gun that rotates every time bank 3 is selected but only for 1 rotation.

what I am after is one of the following
a gun that rotates when bank 3 is selected for the full duration that it is selected then stops when the bank is deselected (preferred)
or
a gun that just rotates for the duration of the mission

the current table flags are
Code: [Select]
$Subsystem: subobject01-Gat_Gun, 2, 0.0
$animation: triggered
$type: primary_bank
+delay: 0
+relative_angle: 0,0,360
+velocity: 0,0,500
+acceleration: 0,0,100

POF values
Code: [Select]
name:       subobject01-Gat_Gun
movement:   Rotate
axis:        Y Axis
properties:  $special=subsystem
             $triggered:
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: question about the animation code
From memory Nukemod used the trigger "primary fired" on a gatling gun I think. . . . .
 
 
Don't quote me though :nervous:
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: question about the animation code
Duration of the mission should be easy but not very good.  All you should have to do is make the gun a subsystem, set rotation in the pof to the axis and set a rotation time either in the pof or table.  It would be a standard rotating subsystem and the fire points would just be related to the ship hull. 

As for the while firing one (which would be more realistic) I have no idea.  The animation code is a bit buggy but there may be fixes in newer builds. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: question about the animation code
If you add the spin on firing, maybe keep the spin on weapon selection to make it seem as if the weapon is readying itself?
17:37:02   Quanto: I want to have sexual intercourse with every space elf in existence
17:37:11   SpardaSon21: even the males?
17:37:22   Quanto: its not gay if its an elf

[21:51] <@Droid803> I now realize
[21:51] <@Droid803> this will be SLIIIIIGHTLY awkward
[21:51] <@Droid803> as this rich psychic girl will now be tsundere for a loli.
[21:51] <@Droid803> OH WELLL.

See what you're missing in #WoD and #Fsquest?

[07:57:32] <Caiaphas> inspired by HerraTohtori i built a supermaneuverable plane in ksp
[07:57:43] <Caiaphas> i just killed my pilots with a high-g maneuver
[07:58:19] <Caiaphas> apparently people can't take 20 gees for 5 continuous seconds
[08:00:11] <Caiaphas> the plane however performed admirably, and only crashed because it no longer had any guidance systems

 

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
Re: question about the animation code
Nuke's MG takes a second to spin up to speed before firing (but will as long as you hold the trigger) IIRC...


"Don't think of it as being out-numbered, think of it as having a WIDE target selection!"

"I am the one and ONLY Star Dragon..."
Proof for the noobs:  Member Search

[I'm Just an idea guy, NOT: a modeler, texturer, or coder... Word of advice, "Watch out for the ducks!"]

Robotech II - Continuing...
FS2 Trek - Snails move faster than me...
Star Blazers: Journey to Iscandar...
FS GUNDAM - The Myth lives on... :)

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: question about the animation code
Actually, after doing a bit of research on the subject, rotating guns is ridiculously easy.

Take a look at the following lines in weapons.tbl:

http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Submodel_Rotation_Speed:

and

http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Submodel_Rotation_Acceleration:

If these are set, the external model assigned to that weapon will rotate around its mountpoint at the set speed. It will start firing once it reaches the set rotation speed.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: question about the animation code
From memory Nukemod used the trigger "primary fired" on a gatling gun I think. . . . .
 
 
Don't quote me though :nervous:

not quite. the gatling guns all use weapon models. the gatling turrets are scripted. the only place i use animation code is for doors or missile bays. of course on old versions of nukemod i attempted to use gatling turrets which used animation code. this didnt work at all and was something i forgot to take out.

Nuke's MG takes a second to spin up to speed before firing (but will as long as you hold the trigger) IIRC...

those would simply use weapon models. the scripted gatling turrets act more like real gatling guns, where the rate of fire is directly proportional to the guns current rpm*number of barrels. they fire in timed bursts where the guns spin up, wait some duration, then spin down. as far as the ai is concerned its only firing about as fast as a blob turret. its armed with a weapon that is kind of a dummy with no damage, sounds or effects. when the turret has fired, it tells the script and the script starts a burst. the effect is totally awesome. it also doesnt break difficulty scaling because the gun will fire bursts at a frequency determined by the engine. the burst does the same amount of damage but is less frequent at lower difficulty.
« Last Edit: June 30, 2010, 12:52:38 am by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN