Posted: Sun Sep 02, 2012 9:48 am Post subject:
voxel debris
a little tip for new modders, adding a voxel debris to tanks, so when they are destroyed, they'll somewhat "throws" or leave debris flying in the air. Debris like their turret or body parts.
add your voxel anim to the list
[VoxelAnims]
xx=MYVOXELANIM
;your tank
[MYTANK]
.
.
.
DebrisTypes=MYVOXELANIM
DebrisMaximums=4
MaxDebris=1
MinDebris=1
if you want the body parts, you'll need to cut some parts of your tank voxel and save it using another file name. and add the Image= tag to your voxelanim and comment out the ShareTurretData= and ShareSource= tags
for example,
[MYVOXELANIM]
;ShareTurretData=yes
;ShareSource=MYTANK
Image=MYVOXELPARTS
Elasticity=0.25
MaxAngularVelocity=15.0
MinAngularVelocity=7.0
MaxZVel=30.0
MinZVel=26.0
MaxXYVel=12.0
Duration=300
ExpireAnim=MYANIM
Damage=30
DamageRadius=50
Warhead=MYWARHEAD
or you could just rename the .vxl and .hva to myvoxelparts
i'm sorry if it is confusing, anyone there who knows a better way for this? pls help _________________
This isn't really anything spectacularly new, as it has been done by few people in the past already.
Anyways, I don't think you want to use ShareSource. It basically has some issues that lead to IE's in certain, albeit not so rare circumstances. I would avoid it therefore. It also does not work at all (for turret/barrel sharing) if you refer to a vehicle using IsChargeTurret, such as Prism Tank.
Also it does not seem that you're aware of what DebrisMaximums does. It supposedly takes a comma-separated list of numbers that is supposed to tell the game how many instances of an individual debris piece it can spawn at maximum. In your example code it's kind of pointless however, considering there's only one debris type specified and MinDebris & MaxDebris are both set to 1. I don't think DebrisMaximums works properly either way, so if you have more than just one type of debris, MaxDebris > 1 and DebrisMaximums set to 1 for all types, game might still spawn more than one turret, for an example. That, or it only worked properly for the first debris type specified. Can't remember. _________________ QUICK_EDIT
oh yeah, s0rry f0r that. I f0rgot ab0ut that, i used to use that tag bef0re using debristype. And for the maxdebris, im looking f0r ways to add also the b0dy parts for the debris, like separated chasis or wheels, but im n0t sure f it wil w0rk wel,cuz it is rand0mly selected theref0re, i c0uld get 2 turrets f0r the debris just like y0u said. Anyways, i also p0sted it to be c0rrected or to add anything else to the c0des. Thankz anyway starku _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum