Home   Help Search Login Register  

Author Topic: Bleed to death.  (Read 1285 times)

0 Members and 2 Guests are viewing this topic.

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Bleed to death.
« on: 31 Mar 2003, 23:01:21 »
Was thinking some yesterday when i had a game, kegetys did the "drop blood" script when you got wounded, but why wasn't there any script for making so that your soldier bleeds to death when he real wounded?

So to make a story short, i made a script that triggers when your soldier gets a hit (eventhandler) and then begins to slowly kill your soldier unless you gets to a medic and heals. And i want to share this one with other people (not 100 %  done but will fix the rest during this week) since it will make the medic more important on the battlefield. The killing goes slow. After one hit with a bullet until you gets really "dead" it take around 10-20 min, of course you can adjust that on your own.  Another thing is that you can start with half dead people in the mission without them have to die during the mission (maybe you want to have some half dead ones don't ask me why) but then they will not die since the script is triggerd on the "hit" event. But if you want the soldiers to slowly dead you can just put the script in the units init..

What i would like to add/fix during this week.

# Making it 100 % multiplayer safe. Current status unknown, not tested

# "Fade out". Making a title cut or something that makes part of the screen black (simulating a "blackout") and making your "combat value" less.  This will not be so often that you can't go back to safe place. Just enough to make it hard to be in the front line and fight.

Thats all for now.

Quote
; Made by granQ for sfp mod. http://www.ofp.axlegames.com/~sfp/
; Thanks to Lt Dan for suggestions and all in #swepack for your help.

_dude = _this select 0

? (SFPbleed) : Exit

#loop
_blood = getdammage _dude
~7
?(player == _dude) : hint "player true"
? (_blood) < 0.1 : exit
? !(alive _dude) : exit
_blood  = _blood + 0.00006
_dude setdammage _blood
goto "loop"

Just to clear some things out.
Quote
? (SFPbleed) : Exit
this the mission maker can put to true making the bleed script Exit and people won't bleed to death.
Quote
?(player == _dude) : hint "player true"
This is just temp until i make the "black out" part.

« Last Edit: 31 Mar 2003, 23:04:08 by granQ »
Cura Posterior

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re:Bleed to death.
« Reply #1 on: 01 Apr 2003, 16:51:47 »
been in school all day and been thinking on the bus home. How would i make so the user had to do none or little editing to get it to work in multiplayer, since i didn't want it to run on both server/client and on the bus i got the idea. Just to make sure that _dude and "player" is same person. Then it will only add damage one time, it will be easier to do the "fade" script. Only bad thing is that ai get uneffected. Well thats all for now. Will work on the "fade" script tonight.
Cura Posterior

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re:Bleed to death.
« Reply #2 on: 02 Apr 2003, 15:53:28 »
Final version done. Works great in both singelplayer and multiplayer. Will be included in next version of SFP soldiers addon ( http://hem.passagen.se/granq/ )  if you want to use it for your addon please let me know.

Script file (include in your addon)

(bleed.sqs)
Code: [Select]
; Made by granQ for sfp mod. http://www.ofp.axlegames.com/~sfp/
; Thanks to Lt Dan for suggestions and all in #swepack for your help.

_dude = _this select 0

? (SFPbleed) : Exit
? !(_dude == player) : Exit

#loop
_blood = getdammage _dude
~5.5
? ((getdammage _dude) < 0.2 ) : Exit
TitleCut ["","BLACK OUT",2.5]
~3.5
TitleCut ["","BLACK IN",0.5]
? ((getdammage _dude) < 0.2 ) :  Exit
? !(alive _dude) : exit
_blood  = _blood + 0.00006
_dude setdammage _blood
goto "loop"

And in the cpp put a eventhandler that triggers the script.

Code: [Select]
#define EVENT_INJURE class EventHandlers {dammaged = "_this exec ""\SFP_m90\script\wound.sqs""; _this exec ""\SFP_m90\script\bleed.sqs"";";
Note the above one featuring also the "wound.sqs", kegetys blood drip script.  If there is any questions just let me know.
Cura Posterior