Posted by: red leader79 - Sunday, January 28, 2007 9:34:55 AM
Hey, this is for the GBF mod, just wondering for the Rapier AA system, its going to have 4 missiles and we want them to disappear as each fires as the tomahawk does.
Posted by: Blbpaws - Sunday, January 28, 2007 10:52:33 AM
I think you can set the amount of fuel in a missile in locomotor.ini. When it runs out of fuel, it stops functioning.
Posted by: krit - Sunday, January 28, 2007 11:12:29 AM
I think he means have the missiles dissappear from the model of the Rapier Launchers as each missile is fired from it.
Posted by: CommieDog - Sunday, January 28, 2007 11:12:33 AM
If you mean hiding the missiles on the model after being fired, you need to set ProjectileBoneFeedbackEnabledSlots= (PRIMARY/SECONDARY/TERTIARY depending on your WeaponSet code) on your W3DDraw module and then add WeaponHideShowBone= (the name of your missile subobjects on your model) to the DefaultConditionState block. If this sounds confusing, feel free to consult the Tomahawk's INI code.
Posted by: red leader79 - Tuesday, January 30, 2007 4:00:36 PM
what if i want 4 to disappear, it only goes to tertiary
Posted by: fleetatks - Tuesday, January 30, 2007 7:43:26 PM
Set Missile 1 and 3 to primary and 2 and 4 to secondary, that way it shoots 2 at a time and you can do it like that.
Posted by: CommieDog - Tuesday, January 30, 2007 8:47:54 PM
Or you can name the missiles as MISSILEXX, with XX being a number from 01 to 99. Generals will take care of the rest if you refer to the array of MISSILE subobjects as "Missile" in the INI code. This has the advantage of using only 1 WeaponSlot, though the unit will be unable to fire two missiles simultaneously.
Posted by: red leader79 - Wednesday, January 31, 2007 4:03:02 PM
Question for CommieDog: Show me exactly how to write this in ini code. Im not sure what conditionstate to put it under, to make a new one, whats going on. Another question: when an item disappears, to all items linked to it disappear as well? I need this to happen since the missiles have fins. I know I could just say hidesubobject but i would much rather not look up the names of 12 squares (don't even bother telling me, i know they all come consecutively) I just dont wanna do that. Also to commiedog: is the missilexx coding the way the guy in whatever mod it was got a missile cruiser to fire from a different bone each time or did he do it a different way.
Posted by: CommieDog - Wednesday, January 31, 2007 7:03:56 PM
[quote=red leader79]Question for CommieDog: Show me exactly how to write this in ini code. Im not sure what conditionstate to put it under, to make a new one, whats going on. [/quote]
As an example, here is the Tomahawk Launcher's W3DDraw module:[code] Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
ProjectileBoneFeedbackEnabledSlots = PRIMARY ; WeaponLaunchBone will be shown/hidden, not just used for firing offset
DefaultConditionState
Model = AVTomahawk
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponHideShowBone = PRIMARY MISSILE
End
ConditionState = REALLYDAMAGED
Model = AVTomahawk_D
End
AliasConditionState = RUBBLE
TrackMarks = EXTnkTrack.tga
End[/code]As you can see, ProjectileBoneFeedbackEnabledSlots= is not attached to a ConditionState, whereas WeaponHideShowBone= needs to be either in every ConditionState listing or in the DefaultConditionState block (where it is inheirited by all other ConditionStates).
[quote=red leader79]Another question: when an item disappears, to all items linked to it disappear as well? I need this to happen since the missiles have fins. I know I could just say hidesubobject but i would much rather not look up the names of 12 squares (don't even bother telling me, i know they all come consecutively) I just dont wanna do that. [/quote]
I don't see why missile fins should be individual sub-objects on a model, but I believe that children of a sub-object hidden by code should also be hidden.
[quote=red leader79]Also to commiedog: is the missilexx coding the way the guy in whatever mod it was got a missile cruiser to fire from a different bone each time or did he do it a different way. [/quote]
I can't say for sure without looking at the code, but the way I told you is certainly how most mods (including the one I'm working on) do it.
Posted by: krit - Wednesday, January 31, 2007 7:41:21 PM
Just merge the fins to the missile itself.
Posted by: red leader79 - Sunday, February 4, 2007 3:41:24 PM
So just to be clear, if i say HideSubObject = PRIMARY Missile and the projectiles are called Missile01-04, the four missiles disappear in order? What happens if more or less rounds are in the clip than missiles to disappear?
Posted by: CommieDog - Sunday, February 4, 2007 6:41:41 PM
[quote=red leader79]So just to be clear, if i say HideSubObject = PRIMARY Missile and the projectiles are called Missile01-04, the four missiles disappear in order? [/quote]
Yes, they should disappear as they are fired.
[quote=red leader79]What happens if more or less rounds are in the clip than missiles to disappear? [/quote]
If there are more rounds in the clip than there are bone positions, I imagine that there will be shots fired from an empty position. If there are fewer rounds in the clip than there are bone positions, I imagine that only the bones that were used should disappear, but then all the missiles should come back before the next clip is fired, but with the next salvo starting from the bone that was next in the lineup. I've never felt the need to do something like this, though, so I may be incorrect.