Home   Help Search Login Register  

Author Topic: Tank crew bailing out but not running away  (Read 615 times)

0 Members and 1 Guest are viewing this topic.

Hans Kloss

  • Guest
Tank crew bailing out but not running away
« on: 25 Feb 2003, 22:42:38 »
I'm trying to get tank crew to get out and  run away from damaged tank  as soon as tank get damaged level around 0.92.....so far they jump out but still remain far too close to vehicle...as a result  of course inevitable explosion kills them.Is there a way to get them away as soon as they leave  burning tank ?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tank crew bailing out but not running away
« Reply #1 on: 26 Feb 2003, 00:33:48 »
Yes.

You'd have to write a script, and there's lots of ways you could do it.     I'm not sure that the AI would respond fast enough to save them from the death explosion of the tank, but it might get them away in time to escape from another round hitting the tank.

Try something like this .... this is not a proper script, its just a sketch

? !(crew in tank):goto "run"

#run
? tank distance crew < 25: crew doMove markername


you could set the marker up to be a particular place or have its location relative to the tank.


Plenty of reviewed ArmA missions for you to play

Hans Kloss

  • Guest
Re:Tank crew bailing out but not running away
« Reply #2 on: 26 Feb 2003, 20:09:22 »
You are going to laugh but how would I put all parameters in the script ?
Would you be so  kind  to sort of give me more lines to put in it .....just don't know where to start and I could not see similar script anywhere else.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tank crew bailing out but not running away
« Reply #3 on: 26 Feb 2003, 21:07:52 »
The first thing is that you have got to understand the basics of scripts.   This is very easy.   If you haven't done so already, look in the Editors Depot and read

A basic introduction to script snippets by snYpir
Johan Gustafsson's Scripting Guide

It's also worth studying Devilchaser's Mission/Scripting Guide and several other tutes.

Anyway, I can't write your script for you because I'm not handy enough with scripts to do it correctly and quickly .... I'd spend a whole evening on it, which is your job  ;D

I'm only going to do this for one tank, you can easily expand it for more.

Let's say you want the crew to run back to their base.   Create a marker in the base and call it "base".    Create a tank and call it "tank1"

We want the crew to bail if the tank is nearly destroyed, so create a trigger.

size:  whole map
condition:   tank1 getdammage > 0.9
on activation:   [] exec "CrewFlee.sqs"

Now create a script file called you've guessed it CrewFlee.sqs.   If you're not sure how to do this read the tutes.

Now, the crew of the tank are automatically named if the tank is named.   So here we go ...


; this is a script to make the crew of the tank jump out and run home if the tank is hit

tank1D unAssign tank1      (hmmm ... this may change the loon's name ... hope not!)
tank1G unAssign tank1  
tank1C unAssign tank1  

#loop

? (tank1D distance "base" < 10) and (tank1G distance "base" < 10) and (tank1C distance "base" < 10): goto "end"

tank1D doMove getMarkerPos "base"
tank1G doMove getMarkerPos "base"
tank1C doMove getMarkerPos "base"

~1

goto "loop"

#end
exit


There will be mistakes in that so check the commands in the command ref guide in the Editors Depot - make sure the syntax is right.   You'll probably need to play with the whole thing to make it work too.   For instance I'm not sure how the script would cope if one of the loons was dead.     If you need to check it use

not (alive tank1D)
etc

Good luck!

Anybody - if you spot any errors feel free to point them out.











Plenty of reviewed ArmA missions for you to play

Hans Kloss

  • Guest
Re:Tank crew bailing out but not running away
« Reply #4 on: 27 Feb 2003, 22:45:28 »
thx for good tips...it sort of works now but I'm too stupid to get it as a script.
this is the way I have done: empty tank plus crew assign as gunner,driver etc.two markers: one for tank to move ,the other as hide out.Trigger one gets tank to move ,trigger two sets tank damage to 0.90...if set higher they wont' get away quick enough.....trigger also unassigns them from tank and get them to DoMove to second marker.Then camcreated explosion blows the tank apart  ;D ;D ;D

once again thx for help and patience......I'm rather slow in learning

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tank crew bailing out but not running away
« Reply #5 on: 27 Feb 2003, 23:35:00 »
Stick with it Hans, it gets easier the further you go along  ;) ;D
Plenty of reviewed ArmA missions for you to play

Hans Kloss

  • Guest
Re:Tank crew bailing out but not running away
« Reply #6 on: 28 Feb 2003, 16:19:20 »
I will stick with this  for time being until I learn how to make a proper scripts...there is however something else that sort of  lingers on my mind now......while looking at CFS DEFAULT CONFIG file I found few lines that might need my further investigation :

T72
 
threat[]={0.900000,0.800000,0.200000}; would first value refer to dammage and made crew bail only if value is higher the0.90 ?

class CombatActions...................

getOutTank="CombatGetOutTank"; here I have not got a clue but if that action can be activated (?)  by trigger that would solve the problem

Anyway - all this is nothing more then  " thinking laud ",But if anyone has got  ideas I would very obliged....

thx