Home   Help Search Login Register  

Author Topic: Loss of fuel after damage/Engine shut off after damage  (Read 4389 times)

0 Members and 1 Guest are viewing this topic.

Bronski

  • Guest
Basically what i am looking for is a script that would cause a vehicle to loose its fuel gradually after suffering a certain amount of damage.

Preferrably i would like to be able to use it on any vehicle and be able to set the damage that starts the leak and the amount of fuel lost (ie how much it goes down each second or so).

The other script would cause the engine to shut off (and stay off) after the plane suffers a certain amount of damage.

Mainly i would need this one on planes and helicopters but if it was availiable for all vehicles that would be great.

If anyone could help me on either of those i would greatly appreciate it.

-Bronski

Bronski

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #1 on: 25 Sep 2002, 00:22:25 »
Oh, i just thought of this.  

Would it be possible to disable the eject command with the script as well?

Example (in init field):  [dammageamount, fuellossamount, eject disabled (true or false)] exec "scriptname.sqs"

The eject command would be disabled at the same time as the fuel loss or the engine off.
« Last Edit: 25 Sep 2002, 00:23:33 by Bronski »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #2 on: 25 Sep 2002, 00:33:42 »
well here is da 1st script (dammage 1)

Code: [Select]
_unit = _this select 0
_dam = _this select 1
_fuel = _this select 2
_eject= _this select 3
_pilot = _this select 4

@ getdammage _unit > _dam
#loop
_unit setfuel (fuel _unit - _fuel )
? _eject : goto "check"
#con
~0.2
? _eject : goto "check1"
#con1
~0.2
? _eject : goto "check2"
#con2
~0.2
? _eject : goto "check3"
#con3
~0.2
? _eject : goto "check4"
#con4
~0.2
goto "loop"

#check
? getout :exit
? ! (_pilot in _unit) : pilot moveindriver _unit

goto "con"

#check1
? getout :exit
? ! (_pilot in _unit) : pilot moveindriver _unit

goto "con1"

#check2
? getout :exit
? ! (_pilot in _unit) : pilot moveindriver _unit

goto "con2"

#check3
? getout :exit
? ! (_pilot in _unit) : pilot moveindriver _unit

goto "con3"

#check4
? getout :exit
? ! (_pilot in _unit) : pilot moveindriver _unit

goto "con4"


tel me if it work  ;)

LCD OUT

« Last Edit: 25 Sep 2002, 23:37:31 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Bronski

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #3 on: 25 Sep 2002, 00:38:47 »
What do you put in the init field?

Is it: [unitname, dammage, fuel, eject (t/f)] exec "scriptname.sqs"

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #4 on: 25 Sep 2002, 01:04:40 »
yes it is ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Bronski

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #5 on: 25 Sep 2002, 02:38:41 »
Everything works but the eject part.  

I get this:  "_eject |#[ error type number, expected bool.... i couldn't make out the rest.

It is roughly what it told me.

This is what i put in the init field: [this, .25, .05, true] exec "fuelloss.sqs"

I am using version 1.75 if that makes any difference.

Otherwise the script works exactly the way i wanted it to.  

Even if the eject thing doesn't work it still helps a lot.  Thanks.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #6 on: 25 Sep 2002, 15:11:17 »
k just edited da script try it again (on da same post)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Gameer_77

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #7 on: 25 Sep 2002, 15:40:41 »
In your script it says "goto "con"". Where's con?  ::)

 8)PEACE

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #8 on: 25 Sep 2002, 16:00:01 »
@ gameer - wat da hel u r talkin bout ?





 ::)







LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Bronski

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #9 on: 25 Sep 2002, 17:40:48 »
The fuel loss is working fine but the eject still isn't working.

I get a different error.

"| _pilot in |#| _unit": Error type object, expected bool....

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #10 on: 25 Sep 2002, 17:51:42 »
ok try da last 1 - u have 2 use pilot not from da choper

exec it like dat

 [unitname, dammage, fuel, eject (t/f),nameofpilot] exec "scriptname.sqs"

nd 2 teminate it use getout = true

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Gameer_77

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #11 on: 25 Sep 2002, 19:18:57 »
@ gameer - wat da hel u r talkin bout ?





 ::)







LCD OUT

Lol, you are one evil son of a...






STOP MAKING ME LOOK LIKE A FOOL!  :tomato:






 8)PEACE

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #12 on: 25 Sep 2002, 19:35:52 »
@ gameer - dis was very long nd interestin post i wil try 2 answer all of it  ;D

Quote
Lol, you are one evil son of a...

LOL, btw here is da answer - f00k off game... (not alowed on forums  ;D)  (  ;) )

Quote
STOP MAKING ME LOOK LIKE A FOOL! :tomato:

let me qoute u ,my freind his name is mageer_77 nd he said

Quote
STOP MAKING ME LOOK LIKE A FOOL! :tomato:


Quote
8) PEACE

" 8)PEACE?" What'dya mean PEACE? Blinking fool...  ::)


dats al i can think off  ::)








 ::)







LCD OUT
« Last Edit: 25 Sep 2002, 19:38:02 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Gameer_77

  • Guest
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #13 on: 25 Sep 2002, 19:45:09 »
@ gameer - dis was very long nd interestin post i wil try 2 answer all of it  ;D

Quote
Lol, you are one evil son of a...

LOL, btw here is da answer - f00k off game... (not alowed on forums  ;D)  (  ;) )

Quote
STOP MAKING ME LOOK LIKE A FOOL! :tomato:

let me qoute u ,my freind his name is mageer_77 nd he said

Quote
STOP MAKING ME LOOK LIKE A FOOL! :tomato:


Quote
8) PEACE

" 8)PEACE?" What'dya mean PEACE? Blinking fool...  ::)


dats al i can think off  ::)








 ::)







LCD OUT


What...the hell...are you on about!  ::)

What's that noise? Uh-oh! It's KttoTE with his anti-spam gun!

RUN!!

:gunman: :noo:


Ahem...

Who is this "Mageer_77"?  ???  ;)

 8)PEACE
« Last Edit: 25 Sep 2002, 19:47:29 by Gameer_77 »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Loss of fuel after damage/Engine shut off after damage
« Reply #14 on: 25 Sep 2002, 19:52:48 »
Quote
What...the hell...are you on about!  

im on dat thing dat my name is how do u call it  ???    ::) ( ;D)

Quote
What's that noise? Uh-oh! It's KttoTE with his anti-spam gun!


RUN!!

i cant run my legs hurts  :o PLZ ktotte dont kil me PLZ dont shot me im just trin 2 help em PLZ  :'(  (  ;D )

Quote
Who is this "Mageer_77"?


donno but he looks prety much like u  :-*  ::)





 ::)




LCD OUT

P.S should i call tomb 2 look @ dis thread ?
« Last Edit: 25 Sep 2002, 19:54:06 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta