Redline 0 Posted April 30, 2002 is there a way to STOP the game from ending when the player dies? what i want to do is basically intercept the players 0 health status and medievac him. is there a way to do this? Share this post Link to post Share on other sites
Redline 0 Posted April 30, 2002 what about KEEPING a player from dying, just say he stays at 10% health... Share this post Link to post Share on other sites
Redline 0 Posted April 30, 2002 sweet I found ONE solution to keep the player from dying... when the player gets to 50% health just use the following script and use a 1000 divisor... another way to implement this is make the player immune to damage until you want him to be injured... basically windows of opportunity to get hurt... because if a player APC gets destroyed while he's in it I don't want him to die... i gota control the campaign somehow... from: http://www.ofpeditingcenter.com/coding/units.shtml How to make tougher units By snYpir. This script allows you make units in the game harder to kill. This is done by reducing the damage taken by a unit during the game. A call to this script would typically be made in the init field of a guy who you want to make tougher. It is called as follows: [name of object, damage factor] exec "toughunit.sqs" the name of the object would be 'this' if u are using the call in an init field of an object. the damage factor is the divisor for the damage taken. if this value is 2, for example, the dude will be twice as tough (damage will be halved). this allows you to have different levels of toughness for different soldiers if you want. Don't forget that this script will work for any object, not just soldiers. so, a typical call to this script would be: [this,2] exec "toughunit.sqs" In the script file itself, if you look at the top of the file you can see a section with variables that you can change. These are described below. _pause = 0.5 This sets the time interval between loops. Should be less than one. _damageFactor = _this select 1 By default, the damage factor is set by the second parameter in the call to the script. If you wanted to make all units who run this script have the same damage factor you could change this value. _noResurrection = false If you change this line to true a unit will die as soon as it's damage is greater than one. So if a huge explosion instantly kills a unit, the damage will not be reduced and the unit will stay dead. If this value is false (default) the damage will be halved even if the unit is dead, effectively bringing the unit back to life. NOTE Although this script will make the player tougher if this is used, the player unit cannot be brought back to life. So if the player suffers heavy damage, the mission will end even though it will appear the player is alive. Download the script file here. script Share this post Link to post Share on other sites