Advertisement

Author Topic: Removing body parts  (Read 1460 times)

0 Members and 1 Guest are viewing this topic.

PubicWarrior

  • Guest
Removing body parts
« on: 30 Jun 2006, 18:19:09 »
is having men caught in explosions losing limbs possible?

if so does it exsist, where can i find it?

if not is it possible to make?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Removing body parts
« Reply #1 on: 02 Jul 2006, 13:27:35 »
i would imagine this is possible using

either a
dammaged eventhandler (not sure if this works on a man class, if it does then great, because one of the elements it passes, is which part of the model was hit)
a hit event handler ((model setobjecttexture selection would have to be randomly selected)

and then selections for the model
and the setobjecttexture command

cfgmodels
class man:default
{
   class tx_man: Man
      {
      sections[]={["L_arm", R_arm", "L_Leg", "R_Leg", };  // etc, etc , etc
      };
}

and the script the hit/dammaged  eventhandler runs would setobjecttexture  "MangledRleg.paa"  etc to a particular model selection


If setobjextexture is a local command, which i suspect it is, then this would require a lot of cpu hogging bandwidth to transmit the call for setobjecttecture to all clients/server for what primarily is a cosmetic look.

However it's probably worth pursuing
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Removing body parts
« Reply #2 on: 02 Jul 2006, 15:03:10 »
I have had this on my mind for a long time now (and was thinking of devving it for FWW2 mod) but there are a few things why it is not very developeable idea..

The most obvious reason is the function setObjectTexture itself which is bugged: when you apply a texture on something via setObjectTexture save the game and then load that saved game; vóila, your setObjectTextured texture has been removed...
Which means you need a constantly looping script checking whether a saved game was loaded (by abusing yet another bugged function, time) and re-setting that damage texture if necessary.. This script would run after a soldier was hit, of course..
And this creates a very viable MP nightmare..
Especially when more than one soldier gets wounded...  :-X

The other thing is that if you would make this thing as good as possible (ie.any good :P ) you would need to have limbs partly torn off (not just mangled) which is a feature that would increase the soldier model's poly count a lot...
You would need to separate the limb model's in sections which you would texture separately with setObjectTexture to get the torn off limb effect look real.. So basicly one leg would consist of at least two 'cylinders' which would both have polys on the 'heads' which is the main reason that would add the polycount of a model...
And the more detailed the model is the more polys you would probably get with this feature...
Plus if you would like to have at least some variation on the torn off limbs so that each soldier would not have a hand severed off exactly the same way it would easily add 4 times the polys that would be added with just one sevearble limb part... :(

I'm not saying it's undoable, just listing the problems I encountered with this on the theorizing part of my developement process..
(If I only had the modelling skills and time to test my theory..)
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Removing body parts
« Reply #3 on: 03 Jul 2006, 01:47:14 »
I have no experience with SP, and therefore am not familiar with any SP related bugs
however to work around this problem, could you not simply place the unit in a nested array specifically used for defining the damage and the model (selection / texture) to be remapped

Then when the mission is reloaded, an automated Init executed script, would check if the special array contained any elements and if so, mapped damage to the object in the array, the script then exiting

or is there more to the sp bug,
will global variable arrays be saved in sp ??

another thought, to get away from the additional polygon count, is it possible to map an invisible texture to hide part of the limb,
or would it show up as white
or if viewed from a certain angle would it show a hollowed out leg ??
« Last Edit: 03 Jul 2006, 01:55:05 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Removing body parts
« Reply #4 on: 03 Jul 2006, 09:46:24 »
I have done it a more simple way, use a hit event handeler and an animation. Make and animation where the target limb is folded all the way back into the torso and it looks like its been amputated by an explosion. I am away from my home computer so I can not attach them at the moment but I have all 4 limbs and somtimes more then 1 at a time. but this makes the persons with the missing legs all be in the same death animation instead of ofps random death animations.

hehe, my first post on new ofpec

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Removing body parts
« Reply #5 on: 03 Jul 2006, 10:27:08 »
Quote
Then when the mission is reloaded, an automated Init executed script, would check if the special array contained any elements and if so, mapped damage to the object in the array, the script then exiting

or is there more to the sp bug,
will global variable arrays be saved in sp ??
Global variable arrays are saved, yes..

But what you mean by 'automated init executed script' escapes me..  ???
Init of a soldier does not get executed upon a saved game being loaded...
By loaded saved game I mean an SP mission which is saved at some point and then later that saved point is loaded up in order to retry from there..
The same 'rules' apply to those retry points that can be put into a mission, etc..

Or am I just completely misunderstanding you :P  ::)

Quote
another thought, to get away from the additional polygon count, is it possible to map an invisible texture to hide part of the limb,
or would it show up as white
or if viewed from a certain angle would it show a hollowed out leg ??
That is exactly why it would add polys, because you would need to model the torn of limb as a stump and texture the end of the stump with a 'bloody mess texture', otherwise you would see inside the model..

And, the torn off part would also need to be a stump so that you would get it completely invisible. If you would leave the end of the torn of part 'unmodelled' it woul dmost likely show some odd parts of the outside model when wieved from certain angles..

And yes, you can texture a model with 'invisible' texture, that is no problem..

Quote
I have done it a more simple way, use a hit event handeler and an animation.
Will you get the torn off limb to look like a bloody stump?
What will happen when a such animated unit goes into some other anim, like to be cared by a medic, etc?

Anims are out of question for me because OFPAnim is compelely and utterly unusable...
If I have to try to use it again I will kill someone.. :P


This whole feature would be quite cool though, would add a lot of intensity to a mission when the player could lose a leg or an arm, and just slowly bleed to death  :D
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Removing body parts
« Reply #6 on: 03 Jul 2006, 14:16:52 »
It does look like a bloody stump yes becasue the blood textures on a unit would warp around the stump. any aditional animations like being caried by a medic would have to be custom made, but that dosent exsist in OFP anyways;

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Removing body parts
« Reply #7 on: 03 Jul 2006, 14:49:51 »
Is the anim made as an .rtm or regular O2 rotation?

This is actually quite nice way of implementing this since the scripting involved is very minimal compared to the whole setObjectTexture hasle..
Never even though about making this with anims, but then again I'm a (crappy) scripter, not a modeller.. ::)

I may need to steal this idea, with your blessing of course ;D :P
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Removing body parts
« Reply #8 on: 03 Jul 2006, 19:32:37 »
But what you mean by 'automated init executed script' escapes me..  ???

lacking again in sp coding knowledge, i only just found out that the INIT.sqs doesnt run after reloading a saved game
and the "time" bug you mentioned resets "time" to 0 after a reload

however if u want to initiate a script after a saved game, then possibly the following system

INIT.sqs
myboolean = true

Trigger
Condition (time < 1) && (myboolean)
On activation: "" exec "myscript.sqs"

myscript.sqs
Quote
myboolean = false
;; add code to check object in "missing limb array"
@time > 1
myboolean = true

trigger script initialisation is now reset for use after a saved game reload
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Removing body parts
« Reply #9 on: 03 Jul 2006, 19:39:09 »
I never ever think in mission scripting terms as I have basicly done addon side scripting for the past few years.. :P

The less the mission maker needs to do to get an addon to work the better, so triggers are right out of the equation..

Anyway, I get your idea..
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline BigDawgKS

  • Members
  • *
Re: Removing body parts
« Reply #10 on: 21 Jul 2006, 19:35:47 »
dammaged eventhandler (not sure if this works on a man class, if it does then great, because one of the elements it passes, is which part of the model was hit)

It works exclusively on man class.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Removing body parts
« Reply #11 on: 21 Jul 2006, 21:12:09 »
OK, im back and can attach them, they are not ingame, they are only viewable in ofpanim, but you can see how they will look once i get a scripter to make the script to play it.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Removing body parts
« Reply #12 on: 22 Jul 2006, 13:26:25 »
Have to take a look at these..

However this way of doing this has one flaw that I don't like at all...
These kinds of anims are switchMove/playMove anims only (right?) which means you can't move when you have set a unit in such an anim without braking up the animation...
One of the things this should have is to have soldiers crawling with their legs blown off, screaming and bleeding to death... :(
Soldiers turning into salt statues without legs would look a bit crappy   :-\

Although, the setObjectTexture thingy would probably fail to work when it comes to wound textures, you would need to use setObjectTexture for regular wounds as well for that to work..
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Removing body parts
« Reply #13 on: 22 Jul 2006, 21:58:08 »
no no those, are just the death animations,

I am working on, crawling, clutching stump and rolling around, seizures and spasms due to blood loss,

those are somewhat finished, but they are progressing nicey. the only problem is they are useless with out a godd core script that handles it. and i have almost no scripting knowledge

Offline Morglor9

  • Members
  • *
Re: Removing body parts
« Reply #14 on: 17 Aug 2006, 21:53:51 »
You know, in MaxRiga's "Ohne Dich" video, when the guys get shot by the BMP-2's 20mm or whatever it is, they turn into a bloody pulp and pieces fly all over, Quake 3 style... Anyone know how to work that?
Cymbaline