Home   Help Search Login Register  

Author Topic: make the tank dieeeeeee muahaha... er....  (Read 1309 times)

0 Members and 2 Guests are viewing this topic.

headshot_snipe

  • Guest
make the tank dieeeeeee muahaha... er....
« on: 04 Feb 2004, 20:00:58 »
I wanna kill the tank's crew and the tank when it get beyond dammage of 0.9 just made this small script but stupid error comes,

Code: [Select]
_tank = _this select 0
_tankg = _this select 1
_tankc = _this select 2
_tankd = _this select 3

@(GetDammage _tank > 0.9):goto #kill

#kill
_tankg setdammage 1
_tankc setdammage 1
_tankd setdammage 1

exit

the error is '(GetDammage _tank > 0.9) [ # ] :goto #kill' : error unknown operator

any ideas?

thx in advance
« Last Edit: 04 Feb 2004, 20:03:00 by headshot_snipe »

Dubieman

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #1 on: 04 Feb 2004, 20:39:42 »
I think this should help it

?((GetDammage _tank) > 0.9) : goto "kill"

I'm pretty sure that should do it.
The unknown operater is that @ mark you put there.
This is a question or event handler or condition, well I don't know the terminology but its saying

IF _tank damage be greater than 0.9  goto kill script
Play around with it if it doesn't work. ;D



« Last Edit: 04 Feb 2004, 21:08:40 by GuiltyRoachKilla »

gundernak

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #2 on: 04 Feb 2004, 20:41:18 »
goto "kill"

'goto #kill' is a syntax error!

Dubieman

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #3 on: 04 Feb 2004, 21:06:31 »
Whoops *cough* errr yah what he said.... :)
Its been edited... :)

What are you trying to do though? Do you want a destroyed tank?Or do you want a pretty much disabled tank with a dead crew?
« Last Edit: 04 Feb 2004, 21:10:27 by GuiltyRoachKilla »

headshot_snipe

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #4 on: 04 Feb 2004, 21:16:49 »
i wanted the tank to blow up before the crew got out, like in a tank battle, main reason is because its the ww2 tanks and their crew are the default ofp soldiers, so when the tank is disabled in battle the crew comes out with m16... which is not on. so i though of making a script which makes any tank blow up when it is damaged beyond a certain point. but i don't want that script to only run at the start of the mission i want it to go until the tank is dead so thats why i wanted to use the @, but i dunno how to use it well.

i tried again with ?(getdammage _tank > 0.9): _tank setdammage 1, that works, but only if i set the tank damge to 0.9 and shoot once on it then it blows up, but when it is attacked by other tanks i doesn't work...

« Last Edit: 04 Feb 2004, 21:21:28 by headshot_snipe »

headshot_snipe

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #5 on: 04 Feb 2004, 21:30:01 »
got it to work  ;D ;D ;D ;D ;D ;D ;D 3 hits to destroy

Code: [Select]
_tank = _this select 0
_tankg = _this select 1
_tankc = _this select 2
_tankd = _this select 3

#loop

?((GetDammage _tank) > 0.15) : goto "kill"

goto "loop"

#kill

_tank setdammage 1
_tankg setdammage 1
_tankc setdammage 1
_tankd setdammage 1

exit



do you know where i can find a tutorial on how to use the @ command?

thx

gundernak

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #6 on: 05 Feb 2004, 12:14:19 »
I would suggest you to not set the dammage for the vehicle, just for the crew.

Because it is not real. The tank will blow up too soon.

Do not you destroy the tank, remain it to use or repair by others.

If the crew dies it is reasonable - they suffered injuries...

Anyway you should use a simple wait operator and you do not have to use labels and goto...:

@ getDammage _tank > 0.15

instead of:

?((GetDammage _tank) > 0.15) : goto "kill"

Last night I wrote you a whole perfect message, I could not post it because you locked the topic ;)

It was about you should test a little bit more the dammage values of the tank by using this scipt (start at mission beginning where tank01 is your tankname:
Code: [Select]
#loop
Hint format ["dammage: %1",getDammage tank01]
~1
goto "loop"
exit

This will show you the dammage value of your tank in every seconds. Fire at the tank with different weapons.

You will be surprised how many various dammage level there can be. There is no exact value you can say they disembark...

headshot_snipe

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #7 on: 05 Feb 2004, 12:21:33 »
Quote
You will be surprised how many various dammage level there can be. There is no exact value you can say they disembark...

indeed, this is really annoying though  >:(, cuz i've got two tanks from different addon makers, therefore the shells they fire are different strenghts  ::)

do the tanks still fire if the tank crew is dead?

thx

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:make the tank dieeeeeee muahaha... er....
« Reply #8 on: 05 Feb 2004, 18:53:35 »
sometimes the game engine needs a lil' time before it recognizes that a certain tank has
no crew (dead crew inside). the best workaround is to make a script that checks if crew is dead.
And if they are, they get ejected! period  :)


make a looped check foreach crew member (gunner, driver etc.) and eject them separately, one by one
This way you force the engine to check for their health
« Last Edit: 05 Feb 2004, 18:54:31 by Tomb »

headshot_snipe

  • Guest
Re:make the tank dieeeeeee muahaha... er....
« Reply #9 on: 05 Feb 2004, 19:54:01 »
thx tomb