Log in to reply
 

[Request] [script] Missile disappear



  • So every mod developer knows, when ruiner2 from import export dlc fires weapon_2a dummy the misc_e on the vehicle turns off, this gives the illusion of missile actually leaving the vehicle, now my question is,

    Can any among you talented mod developers scripter writers and coders achieve this native feat on a different names dummy ? Like extra1?

    So that when I fire weapon_2a on my aircraft extra1 turns off and disappears?

    Just like in the case misc_e turns off when weapon_2a fires on ruiner2?





  • @FoxtrotDelta Well you can turn off extras but I don't think that you can do that with other parts.



  • @FoxtrotDelta Can you not add the missiles like tuning parts, then just turn off the tuning option by script? It would be like making a spoiler disappear, or arch covers for instance.



  • @LeeC2202 that's what i am asking, they did the same with ruine r made misc_e, f,g,h,i,j,k as tuning parts and when we fire weapon_2a,b,c,d,e.f,g the misc objects just disappear automatically when we hit fire.

    I can't make a script hence I am asking script developers.



  • @Oskar misc_e etc on ruiner2 are not extras nor tuning parts they are part of the cars hiarchy



  • @FoxtrotDelta I guess the function for that is probably hard coded. Although I'm not sure, it's just a guess.



  • @FoxtrotDelta @Oskar Yeah I imagine something like that would be hard coded. I could poke around in the exe to see if I find anything.



  • @CamxxCore That would be Great!. may be a native call , when ruiner fires.



  • @SkylineGTRFreak we need to collaborate on this man. we need this feature ASAP!



  • @FoxtrotDelta I managed to find the code in question :D Interestingly, it seems to check a flag in the vehicles model which defines it as having "missile battery" features (instead of just explicitly checking if it is the ruiner2 model). Although, I think this is still somehow specific to the ruiner2 since I never saw it defined for any other vehicle that has missiles. And the code was only added in the import/ export update (b944). But what is also interesting is that it doesn't actually hide the dummies at all. It just sets them slightly recessed on the vehicles model so they are out of view:

    alt text

    You can see it is hard-coded to set them recessed by 0.11 units based on a value in the vehicles CVehicleWeaponMgr instance. So probably no way to do this dynamically with other bones/dummies. But now that I see how R* does it, it could easily be done with a script.

    edit: Actually, I was wrong about it not explicitly checking the model. The number it checks on the vehicle model appears to be the internal model number for the ruiner2 (so no doubt a script would be needed).



  • @CamxxCore something similar happens when a tank fires it's cannon in GTA 5, the turret recessed [kicks back] and then comes back to it's original position, i have thought about using kick back feature of the tank on aircraft weapons by writing a new code lines for the weapon, the thing is even if the weapon is recessed by our defined measurement units, the aircraft's wings are just to thin to hide huge missiles! And if recessed backwards they will be visible in air,

    Although if we do it so that they recess instantly into the body shell of the aircraft, that is big enough to hide the missile there.

    Thank you for your time and energy you are very talented and skilled :D . if writing simple weapon meta lines doesn't do it, we will need a script!

    Edit: would it be easy for you to write a missile disappearing script? That works universally on aircraft? Now that you have uncovered the secrets behind it?



  • @FoxtrotDelta Yeah I can probably do that. Is there a vehicle I can download to test it with?



  • @CamxxCore not yet. but i shall impliment the things on my latest ready model. G-91 what dummies or stuff do you require in it? what should i name the disappearing part?



  • @FoxtrotDelta Okay cool. From what I can tell it shouldn't really matter.. Maybe using any of the misc_ ones makes the most sense though.



  • @CamxxCore well because on aircrat MISC objects are all the ones that Rotate. and spin like propellers.

    may be i can just name those weapon as extra_1 , 2, 3 & 4?



  • @CamxxCore As you've found the code for recessing missiles in the .exe, is it maybe possible to do the same for the function of hiding and showing extra_x parts? So that you can use it for your own purpose and hide/show any part of a vehicle?



  • @Oskar Yeahh it seems the method for moving dummies around is pretty standard across any vehicle parts. The only problem I can see is if the part is too big to be hidden inside the fuselage/body of the vehicle



  • @CamxxCore yes moving it inside would be a problem on aircraft. Can you make it disappear?

    Like bone turn off?



  • @CamxxCore @Oskar @FoxtrotDelta you have idea add Missile launching ? is much nice ! =D


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.