Home   Help Search Login Register  

Author Topic: Tank burn help...  (Read 642 times)

0 Members and 2 Guests are viewing this topic.

Knut Erik

  • Guest
Tank burn help...
« on: 11 Apr 2003, 17:11:32 »
After I downloaded the "drop untily" I finaly learned about the drop command. (Thanks a lot to uiox !  ;D "

I decided to make my own little "tank burning script". However i can't get it to work properly.
When the unit dies, the script runs for a milisecond and then exits  >:( so i only get to see the first drops. I want to make the script run for x seconds.

When i "setdammage 1" a unit, the script runns in x seconds.
Here is the script :


Code: [Select]
_tank = _this select 0

@ not canmove _tank and not canfire _tank || not alive _tank
   ~3
#loop

Due to the big space the drop commands take, i decided NOT to put them here. I'm sure they're correct.

~0.3
? _time < 60: goto "loop"
_tank setdammage 1

Does anybody have a clue about what is wrong here.
(I have [this] exec "tankburn.sqs" in every init field of the tanks.

Phew  :-[

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tank burn help...
« Reply #1 on: 11 Apr 2003, 17:19:01 »
_time measures the time since the script started running.   The script is called at the start of the mission.    So if the mission has been running for more than a minute the loop will never happen.

Replace _time with a counter, so that it counts the iterations of the loop.

If you're using "@" for every tank in the mission, watch out for lag.    Since there is a 3s gap between the tank being zapped and starting the drops, you might want to consider a loop (say 0.5s, the same as triggers) instead.


Aside:   I was only able to answer this because the tiny detail
Quote
(I have [this] exec "tankburn.sqs" in every init field of the tanks.

which just goes to show how important it is to tell us everything about the problem.    Assuming I'm right. [/i]:P
« Last Edit: 11 Apr 2003, 17:20:13 by macguba »
Plenty of reviewed ArmA missions for you to play

Knut Erik

  • Guest
Re:Tank burn help...
« Reply #2 on: 11 Apr 2003, 17:49:53 »
erm.. I'm not so very sure about what a "Counter"  ??? :-[

Can you please explain  :P

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tank burn help...
« Reply #3 on: 11 Apr 2003, 17:56:58 »
Knut Erik, never be embarrassed about a follow up question, or if you're not sure about something in the original answer.

I can reply most easily with an example.   Ask again if its not clear.


_tank = _this select 0

_counter=0

@ not canmove _tank and not canfire _tank || not alive _tank
   ~3
#loop

Due to the big space the drop commands take, i decided NOT to put them here. I'm sure they're correct.

~0.3

_counter=_counter+1
? _counter>180: goto "loop"


_tank setdammage 1
exit

Plenty of reviewed ArmA missions for you to play

Ace

  • Guest
Re:Tank burn help...
« Reply #4 on: 11 Apr 2003, 21:32:25 »
http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=7532

is a ready done script for burning tanks. I don't need to tell yu how to use it because you know drop so you what to edit to make it last longer or shorter bla bla

Knut Erik

  • Guest
Re:Tank burn help...
« Reply #5 on: 11 Apr 2003, 22:55:10 »
Thanks for the advice, Ace. I'll check it out...

And MacGuba. Onse again you have proven that u are the best  8)
I got the script to wooork!!

Topic solved and locked !
Topic solved and locked !
Topic solved and locked !
Topic solved and locked !
Topic solved and locked !
Topic solved and locked !
Topic solved and locked !