Author Topic: Weapon question...Models.  (Read 1859 times)

0 Members and 1 Guest are viewing this topic.

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
Weapon question...Models.
Ok, so if I decide to treat some new weapons for a specific purpose AS missiles/bombs, my question is: CAN you have a weapon POF that has a rotating hull/body by making the core of a weapon a small cube and have the weapon rotate around that point???

  I haven't tried it myself yet, and wanted some info before I got all excited in case it can't be done. A few of them will rotate towards the target like a sawblade, while others will rotate sideways like a drill.

"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 TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
Re: Weapon question...Models.
Ship can, but I dunno about missiles. Nomrllay you set the rotation (like radard) in the ships.tbl, dunno if you can put something like that for missiles...especually since missiles aren't supposed to have subsystems..
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
Re: Weapon question...Models.
Well I guess I could make it a situation liek a ship firing a ship at the target then. But then how do I make sure the "ship/weapon" detonates on impact without having to FRED it. Some sort of table tag to detonate in proximity?

You might have guessed it by now but I am almost ready to test the Rocket Punch/Screw Scruncher Punch as well as some thrown melee weapons like Axes (but they all have rotating parts or will rotate in entirety themselves.)


"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 Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Weapon question...Models.
Weapon rotations can - most likely - be scripted...
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: Weapon question...Models.
Myself and Baxslash went over something pretty similar
Robo... We arrived at the final idea of ship launching ship or ship triggers
powerup icon that launches ship else ware...

True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Weapon question...Models.
i tried this once for a rail gun effect and it didnt work. you can do this with scripting. just increment the Orientation.b value every frame. would be something like:

Code: [Select]
for i=1, #mn.Weapons do
 if mn.Weapons[i].Name == "spinningmissilethingie" then
  ori = mn.Weapon[i].Orientation
  ori.b = ori.b + 5*ba.getFrametime();
  mn.Weapon[i].Orientation = ori
 end
end

im not sure you might need to do some matrix math, im not sure if applied rotations are local or if this is for its world space transform. if that doesnty work you can just borrow my matrix multiply function (i think its called matx), from my guided missile script then you can substitute:
ori = mn.Weapon.Orientation
with
ori = ba.createVector(0,0,0):getOrientation()
this essentially creates a blank orientation, rather than copying the original then replace:
mn.Weapon.Orientation = ori
with
mn.Weapon.Orientation = matx(ori, mn.Weapon.Orientation)
that should work
« Last Edit: September 15, 2007, 10:09:32 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 Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Weapon question...Models.
Game handles orientations already as matrixes so there is really no need to do that calculation via scripts IMHO let the game engine do that as the 'hard code' for it already exists.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Weapon question...Models.
sometimes the way the game handles matrices doesnt work with what you want to do. like with my guided missile script, i tried doing something similar to what i posted, but if you were at an odd angle, like if you had rolled 90 degrees left and right would be up and down. though im pretty sure therers another way around the problem.
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 Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Weapon question...Models.
Cant be sure but iirc missiles - at least non-external model missiles - fire always using the same 'banking orientation'. Perhaps just something like swapping missiles 'roll angle' to same as which the ship has at the moment of firing?

BTW... the script you posted...
Code: [Select]
  ori = mn.Weapon[i].Orientation
  ori.b = ori.p + 5*ba.getGrametime();
  mn.Weapon[i].Orientation = ori
That would generate rather weird flight behavior :D
Do not meddle in the affairs of coders for they are soggy and hard to light

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Weapon question...Models.
howed that p get in there :D

anyway that could work but i wanted the missile to behave like it was a ship, for the missile cam i was trying to implement. essentially i wanted it to work just like it did in descent 2.

we really need more scripters. just so that i have scripts to look at. im certainly good at generating them but its hard to come up with ideas sometimes. i spend alot of time thinking about what can be done and what cant. and im pretty sure theres stuff that i think is impossible that can be done. more scripters means more people to poke at more problewms from more angles and in theory get more done and come up with better scripts. seriously lua is one of the more plesant languages ive written in. its straight forward and dynamicness is automatic. id also like to see more coders participate because i think the system should be allowed to grow.
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

 
Re: Weapon question...Models.
I personally think it would be MUCH easier to do in FRED. Make it a ship with rotating sub-objects and then just check off "kamikaze" in FRED.
"I only miss what I don't hit."
Show me something that beats 87 BF reds and I'll show you Hateful Lies!!!

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Weapon question...Models.
im skilled in every aspect of fs modding but fred. so nothing in fred is easy :D
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 Getter Robo G

  • 211
  • Elite Super Robot Pilot
Re: Weapon question...Models.
Yeah Warp Shadow... I think I'll try that also. Unfortunately, if I go that route that will eat up like around 10 ship slots (future weapon list).

"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... :)