Author Topic: request: animation on firing  (Read 4155 times)

0 Members and 1 Guest are viewing this topic.

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
request: animation on firing
Hello there wizards
I've been working on a mod for a while now and I'm using quite a bit of animation in it. The animation 'triggers' are however a bit limited. What I'd love to see next to primary_bank is primary_bank_fired or something along those lines. As well as certain key presses like throttle increase or when strafing is pressed.
I have no idea if this is scriptable but I have absolutely zero scripting knowledge and no programming talent myself.

Is this easy to add or am I making a unreasonable request here?  :)
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: request: animation on firing
Look at the FTFx Thor (sp) on the Wiki.

It has a damn nice animation phase for the firing of the Thor's Hammer. Would make a passable start for something like the main gun on the BeBop if you wanted to go Cowboy.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Look at the FTFx Thor (sp) on the Wiki.

It has a damn nice animation phase for the firing of the Thor's Hammer. Would make a passable start for something like the main gun on the BeBop if you wanted to go Cowboy.
Aye ive seen it before when I did my first 'research' into the animation
The Thor however uses the 'primary_bank' trigger. You select the bank the thor's hammer is in and the animation triggers.
What I would like however is a trigger when you actually fire a weapon (for recoil animation etc)
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: request: animation on firing
Ahhh. K. Yeah, that would be cool.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: request: animation on firing
I'm fairly sure this trigger is in place
though knowing my luck it get removed
I know I left instructions on how to add triggers, possibly in the internal forum.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
If the trigger already exists then I humbly request that it be added in the wiki page on animation code. (pretty please with some space refined sugar on top)
If not, how much 'effort' is it to add such a thing? As I already said, I have close to zero scripting knowledge
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: request: animation on firing
Where are the weapons for that ship pack, I've had it for a while now but never got around to finding them....
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 Flipside

  • əp!sd!l£
  • 212
Re: request: animation on firing
I'm pretty sure the Maul on the Azaes I made would only rotate when fired, but I can't remember if that was a 'gatling gun specific' type code...

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: request: animation on firing
Nukemod features animated / rotating chaingun style external animations. D'oh I should have remembered earlier. It's on freespacemods.net
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 Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Just checked out the nuke mod tables
Code: [Select]
$Subsystem: gatling01,100,0
+untargetable
$animation: triggered
$type: Turret Firing
+sub_type: 1
+delay: 0
+relative_angle: 0,120,0
+velocity: 0,5000,0
+acceleration: 0,10000,0
+time: 100
Its done with turret firing. Which unfortunatly =/= primaries firing
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: request: animation on firing
Does it have the desired end result? If so, what's the prob. .  :huh:
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 Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Does it have the desired end result? If so, what's the prob. .  :huh:
Eeeh.. should be pretty obvious why this does not bring the desired end result right?
Player primary weapon =/= turret
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: request: animation on firing
Just checked out the nuke mod tables
Code: [Select]
$Subsystem: gatling01,100,0
+untargetable
$animation: triggered
$type: Turret Firing
+sub_type: 1
+delay: 0
+relative_angle: 0,120,0
+velocity: 0,5000,0
+acceleration: 0,10000,0
+time: 100
Its done with turret firing. Which unfortunatly =/= primaries firing

dont use that, it never worked

you can use the weapons model feature to have gatling guns, however thats about all you can do with it. if you want something else, like recoiling weapons, you may be able to script those, but it wont be pretty. im not sure if theres any way to actually tell if a ship is firing from scripting, aside from constantly scanning for weapons of a certain type fired by a certain ship. and even then theres no way to know for certain what bank it was from.

I'm fairly sure this trigger is in place
though knowing my luck it get removed
I know I left instructions on how to add triggers, possibly in the internal forum.

any way you can make this public? ive been giving thought to enhancing the animation system to do some of the things ive been doing in script, only faster (animating things from script can cost up to about 5 fps, and might cause collision detection problems). ive also been giving thought to extending the capabilities of the weapon models system as well. making scripting do these things by brute force may not be the best thing to do with the engine.
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

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Quote
if you want something else, like recoiling weapons, you may be able to script those, but it wont be pretty. im not sure if theres any way to actually tell if a ship is firing from scripting, aside from constantly scanning for weapons of a certain type fired by a certain ship. and even then theres no way to know for certain what bank it was from.
Sounds like a no go then, pity
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: request: animation on firing

I'm fairly sure this trigger is in place
though knowing my luck it get removed
I know I left instructions on how to add triggers, possibly in the internal forum.

any way you can make this public? ive been giving thought to enhancing the animation system to do some of the things ive been doing in script, only faster (animating things from script can cost up to about 5 fps, and might cause collision detection problems). ive also been giving thought to extending the capabilities of the weapon models system as well. making scripting do these things by brute force may not be the best thing to do with the engine.

well seeing as I do not have that little SCP icon next to my name, no.
maybe there should be a new user group of people who have access to the internal, but are not active coders.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: request: animation on firing
that would be a good idea, since i seem to be writing c whenever i hit a scripting roadblock. if you can atleast point me in the right direction in the code that would be good too.

Quote
if you want something else, like recoiling weapons, you may be able to script those, but it wont be pretty. im not sure if theres any way to actually tell if a ship is firing from scripting, aside from constantly scanning for weapons of a certain type fired by a certain ship. and even then theres no way to know for certain what bank it was from.
Sounds like a no go then, pity

id kinda like recoiling weapons myself, since i decided to mod some large caliber single barrel guns to use as weapon models. i don't exactly like the idea of them being static. i figure if missiles "pop out" when they reload, then it shouldnt be too hard to make guns pop back when you fire them. it you want something else all together, be specific and i can tell you if ive done it or not.
« Last Edit: July 27, 2009, 10:07: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

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Quote
id kinda like recoiling weapons myself, since i decided to mod some large caliber single barrel guns to use as weapon models. i don't exactly like the idea of them being static. i figure if missiles "pop out" when they reload, then it shouldnt be too hard to make guns pop back when you fire them. it you want something else all together, be specific and i can tell you if ive done it or not.
I'd like to have recoil for a hand held weapon, so all it would need is a 'fire button pressed' kind of trigger that would rotate a subsystem up and down to simulate the recoil effect. And a like wise effect/trigger for swaying legs/arms when strafing and increasing speed.
That's all really 
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: request: animation on firing
so you wan to turn freespace into a battletech style game? would be cool. i had been actually contemplating a way to do some simple ik in fs with scripted submodel animation. you can getinfo like the amount of lateral thrust the player is applying and adjust the animation accordingly. pretty much any of the game axes can be captured in this sort of way. scripting also has an orientation interpolating function that works quite well to smooth things out.

for a mech you could set up the arms as turrets, since mechs use actuators for that purpose anyway, and then write a script that calls fire_turret on them. you can then use the stock animation code to create the recoil animation. multipart turrets are very scriptable when it comes right down to it. as my freespacelancer and trackir turret control and other videos on youtube would attest. i intend to lump many of those features together in cockpit demo 3, which will also be very moddable (without any scripting knowledge).
« Last Edit: July 27, 2009, 01:32:46 pm 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

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: request: animation on firing
Quote
so you wan to turn freespace into a battletech style game?
That's more or less the idea, though it's more gundam inspired then battletech

Quote
as my freespacelancer and trackir turret control and other videos on youtube would attest. i intend to lump many of those features together in cockpit demo 3, which will also be very moddable (without any scripting knowledge).
Wow you really did some crazy magic there  :eek2:

Quote
for a mech you could set up the arms as turrets, since mechs use actuators for that purpose anyway, and then write a script that calls fire_turret on them. you can then use the stock animation code to create the recoil animation. multipart turrets are very scriptable when it comes right down to it
ah, this sounds beyond me. For one, I don't really understand on how making the arms turrets and then calling fire_turret with script on them is going to give a recoil effect when a primary weapon is fired?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: request: animation on firing
"that would be a good idea, since i seem to be writing c whenever i hit a scripting roadblock. if you can atleast point me in the right direction in the code that would be good too."

look in modelanim.h. assuming the basic file structure hasn't changed seance my copy was checked out.
there are some spartan instructions there.
basically just do everything that TRIGGER_TYPE_TURRET_FIRING does, except do the function call in the ship fire weapon function.
« Last Edit: July 27, 2009, 09:08:58 pm by Bobboau »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together