zero hour mad map maker
9 years ago
The Answer is yes, you can. If you want a unit to bounce when it dies (like from an explosion)just add a SlowDeathBehavior module using .ini.

Like in this coding:


Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RangerDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
(Credit goes to AcidBrain. Thank you!)

The parameters that will change your unit's "bounce" are the Flings. Just experiment around with them. 😄
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
Sponsor
AdrianeMapMaker
9 years ago
thanks,for making a new thread
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago


I think what you're talking about is the meta impact code added in ZH. It was added to a few weapons with large explosions (The MOAB and Nuke General's nuclear MiG are the only ones that come to my mind) and sends infantry and vehicles flying even if the weapon doesn't kill them.

The INI code for that effect relies on code inside the game engine that was added to ZH, so adding the INI code to a vanilla Generals mod wouldn't work.

CommieDog wrote:




;Vanilla Generals AmericaInfantryRanger
Behavior = SlowDeathBehavior ModuleTag_Death03
  DeathTypes          = NONE +EXPLODED
  SinkDelay           = 3000
  SinkRate            = 0.5     ; in Dist/Sec
  DestructionDelay    = 8000
  FX                  = INITIAL FX_GIDie
  FlingForce          = 8
  FlingForceVariance  = 3
  FlingPitch          = 60
  FlingPitchVariance  = 10
End

;Zero Hour AmericaInfantryRanger
Behavior = SlowDeathBehavior ModuleTag_Death03
  DeathTypes          = NONE +EXPLODED
  SinkDelay           = 3000
  SinkRate            = 0.5     ; in Dist/Sec
  DestructionDelay    = 8000
  FX                  = INITIAL FX_RangerDie
  FlingForce          = 8
  FlingForceVariance  = 3
  FlingPitch          = 60
  FlingPitchVariance  = 10
End
I find the same Fling parameters in both vanilla gens and zero hour, only used for infantry units though, i guessed it was the Fling parameters because well, it made sense to me, didnt test it because i was too lazy to set up a test map for it..:P
If for some reason it doesnt work i think you can work your way around it with an OCL, use the same logic as a vehicle, delete the original infantry model on impact with a slowdeath module (DeathTypes = NONE +EXPLODED) and OCL in a new infantry model which flies away...

This OCL example is from the humvee, the parameters you are interested in are the Mass, Disposition and DispositionIntensity, Count is 1 because it wouldnt make sense if you spawn in more then 1 body which flies away 😉..

CreateDebris
ModelNames = AVScrap2 AVScrap3 AVScrap4 AVScrap5
  Count = 4
  Mass = 5.0
  Disposition = SEND_IT_FLYING
  DispositionIntensity = .5
End
Maybe you can make a new infantry unit especially for the purpose of flying away(only used in OCL just like vehicle scrap) and give it a lifetime which is just enough to fly off screen before it is deleted.

Didnt test al of this because well i just woke up and im very very lazy atm...

Greetz
Panem et kirkinses
CommieDog
9 years ago

I find the same Fling parameters in both vanilla gens and zero hour, only used for infantry units though, i guessed it was the Fling parameters because well, it made sense to me, didnt test it because i was too lazy to set up a test map for it..:P

Originally Posted by: acidbrain 


That's a different bit of code from what I was thinking of, but I suppose that would work. There would be two things different about using code in the death module:
    [*]The unit would only go flying on death[*]The amount of force applied to the unit would be random (I see code for that) instead of dependent on proximity to the explosion
Still, this would be good to emulate the meta impact code in ZH.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
acidbrain
9 years ago


That's a different bit of code from what I was thinking of

Originally Posted by: CommieDog 


What code exactly are you thinking of then? im curious but i get the feeling that it is hardcoded in ZH...


Still, this would be good to emulate the meta impact code in ZH.

Originally Posted by: CommieDog 


I guess you meant vanilla gens here, right?

*Edit*
Well, i did a bit more research and came to the conclusion that you are right, in Weapon.ini there are some parameters which cannot be found in vanilla gens...
-ShockWaveAmount
-ShockWaveRadius
-ShockWaveTaperOff

These parameters are only used with heavier weapons such as the moab and nukecannon so it would make sense if these are the parameters you are refering to...
Didnt use these parameters yet but i think they are fun to play around with although i think that these parameters would give an error in vanilla gens, didnt test it yet, tired...:P
Panem et kirkinses
CommieDog
9 years ago
Yes, those are what I'm thinking of. I'd be surprised if they work in Vanilla Generals--I would expect either for the code to be ignored ingame, or set off an error in the Vanilla Generals INI parser.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Annihilationzh
9 years ago

-ShockWaveAmount
-ShockWaveRadius
-ShockWaveTaperOff

These parameters are only used with heavier weapons such as the moab and nukecannon so it would make sense if these are the parameters you are refering to...
Didnt use these parameters yet but i think they are fun to play around with although i think that these parameters would give an error in vanilla gens, didnt test it yet, tired...:P

Originally Posted by: acidbrain 


Making a bomb that does no damage but sends out several shockwaves is so fun to play around with. Make a big one and it'll send an entire army off screen.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.