OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 11 Jan 2005, 11:34:44
-
Hello
I found this bleeding script by searching the faq here at the site.
BUT i doesnt work i get a error message. saying something about the @(getDammage _victim < .25) : goto "Loop" line
_victim = _this select 0
#loop
~0.1
@(getDammage _victim < .25) : goto "Loop"
?(_victim == player) : hint "You're bleeding from your wounds!"
#Bleed
~20 ; Change it for other delay time
_victim setdammage (getDammage _victim) + 0.05
? (not alive _victim) :exit
? (getDammage _victim > .4) and getDammage _victim < .46) and _victim == player) : hint "You're still bleeding!"
? (getDammage _victim > .5) and (getDammage _victim < .56) and (_victim == player) : hint "You need medical assistance!"
? (getDammage _victim > .6) and (getDammage _victim < .66) and (_victim == player) : hint "Hell! You lost alot of blood!!"
? (getDammage _victim > .7) and (getDammage _victim < .76) and (_victim == player) : hint "You've got to stop this bleeding!!"
? (getDammage _victim > .8) and (getDammage _victim < .86) and (_victim == player) : hint "You need help! Immediately!!!"
? (getDammage _victim > .9) and (getDammage _victim < .96) and (_victim == player) : hint "You're almost dead..."
Goto "Bleed"
Anyone know why? And if you do how do i fix it.
I executed the script as instructed.
-
either:
- replace @ with ?
- rewrite the following
#loop
~0.1
@(getDammage _victim < .25) : goto "Loop"
as:
@(getDammage _victim >= .25)
EDIT>
anyway with that kind of code you'll never be able to heal,
better finish the mission fast or you'll die anyway
-
When you get an error message, always quote it exactly including the #. It really helps in trying to figure out what's wrong. ;) You may have to replicate the error a few times till you can write down the whole message, they are long and messy sometimes.
Anyway, in this case it's fine because it's bloody obvious what's wrong with the line. ;D Let us know how you get on with sa8gecko's suggestion.
-
aha so you cant stop the bleeding in that script?
Anyone know how to fix that?
-
sa8geckos advice worked fine on getting the code i found on the faq to work. I replaced the @ with a ?.
-
After this line
? (not alive _victim) :exit
add this line
? (getDammage _victim) < 0.25 : exit
Syntax not guaranteed, but the point is that if the unit has been healed the script will end.
Edit: please add a Comment to the FAQ item so that in the future people will know what to do.
-
I will test that Mac. And sure ill post a comment with the edits i have put in when i get it to work.