Posted by: exterminator - Monday, December 1, 2008 11:42:37 AM
Hey,recently I've been working on making soldier bodies not sink into the ground,cause that really sucks and it's so unrealistic.
Yup,it worked out great,except dead bodies were causing traffic problems ,which was
blocking the enemy attacks (I think you got the point)... Is there a way to prevent this?
Any help would be appreciated !
Posted by: bel3ve - Monday, December 1, 2008 11:55:50 AM
Is the project you are working on an .INI mod, or are you directly altering the .w3d corpse models?
Posted by: exterminator - Monday, December 1, 2008 11:58:12 AM
Errrr... ,no I was talking about a map.ini...
Posted by: Annihilationzh - Monday, December 1, 2008 2:10:54 PM
hmm...
This may cause some unwanted side effects, but have you tried using 'AllowCollideForce = No' in PhysicsBehavior?
[quote]Is the project you are working on an .INI mod, or are you directly altering the .w3d corpse models?[/quote]
Huh? What use is this question?
Posted by: exterminator - Tuesday, December 2, 2008 5:30:14 AM
Well,now I did but when i click 'play game' ... you know - the good old 'A serious error occured ...'I edited the file at least 10 times but it just didn't work out.Here's the code stuff if you think I did something wrong:
[code]
Object ChinaInfantryRedguard
ReplaceModule ModuleTag_Death01
Behavior = SlowDeathBehavior ModuleTag_Death01_Override
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED - POISONED_BETA -POISONED_GAMMA
SinkDelay = 9000000000
SinkRate = 0.1
DestructionDelay = 9500000000
FX = INITIAL FX_RedGuardDie
End
End
ReplaceModule ModuleTag_07
Behavior = PhysicsBehavior ModuleTag_07_Override
Mass = 5.0
AllowCollideForce = No
End
End
End
[/code]
It works fine without the 2nd part.Still thanks!
Posted by: Annihilationzh - Tuesday, December 2, 2008 8:57:06 AM
[quote]It works fine without the 2nd part.Still thanks![/quote]
It shouldn't work without the second part, because there is an error in the first part.
"- POISONED_BETA" should be "-POISONED_BETA"
In testing, with this correction, it didn't crash for me.
Posted by: exterminator - Tuesday, December 2, 2008 9:09:26 AM
hmm,this still isn't working
actually there was no mistake in the first part at all...(at least in my notepad ++ there wasn't) I don't know why was it displayed like that here
Anyway I still don't find anything wrong and it crashes [skull]
Posted by: Annihilationzh - Tuesday, December 2, 2008 9:12:33 AM
is it possible that notepad++ is doing something fishy? Because, as I said, this works for me:
[code]Object ChinaInfantryRedguard
ReplaceModule ModuleTag_Death01
Behavior = SlowDeathBehavior ModuleTag_Death01_Override
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 9000000000
SinkRate = 0.1
DestructionDelay = 9500000000
FX = INITIAL FX_RedGuardDie
End
End
ReplaceModule ModuleTag_07
Behavior = PhysicsBehavior ModuleTag_07_Override
Mass = 5.0
AllowCollideForce = No
End
End
End[/code]
Posted by: exterminator - Tuesday, December 2, 2008 9:18:12 AM
agh .. now I saw what I was missing.. thanks now it worked fine but it still doesn't fix the bug this topic was made for.
Posted by: Annihilationzh - Tuesday, December 2, 2008 9:49:52 AM
Strange.
Have you tried Kindof NO_COLLIDE?
I'm just guessing here. I don't normally put these things in to my code.
Posted by: exterminator - Tuesday, December 2, 2008 10:18:36 AM
Actually I was just doing that at the moment [wink] but I guess this will have a very unwanted side effect - vehicles might go straight through the infantry guy even when not yet killed :(
Posted by: CommieDog - Tuesday, December 2, 2008 11:04:29 AM
I think you'll need to have the infantry spawn a corpse object upon death and make the corpse object ignore geometry by setting KindOf=NO_COLLIDE.
Posted by: exterminator - Tuesday, December 2, 2008 11:32:31 AM
Well,that's easier said than done.I have absolutely no idea how to do that.
An example would be nice [smile]
Posted by: CommieDog - Wednesday, December 3, 2008 12:56:56 AM
Take a look at the code that spawns flaming infantry in response to death by flame weapons. It's basically the same thing, except you'll need a different corpse object for each infantry unit.
Posted by: exterminator - Wednesday, December 3, 2008 4:29:03 AM
Hmm ... So I guess that means making my own Module thing.If that's what you mean I think I know what to do [smile]
Posted by: CommieDog - Wednesday, December 3, 2008 9:34:26 AM
No, it's more than that. You'll need to create new objects, not just new modules. Take a look at FlamingInfantry in \Object\System.ini for an example.
Of course, you'll need to edit the code of the actual infantry units to spawn the corpse objects.
Posted by: exterminator - Wednesday, December 3, 2008 10:12:55 AM
Thanks, but that's a task for a real coder , I barely know the first steps in making .ini files :ashamed: (I'm 14 if anyone wants to know)