Home   Help Search Login Register  

Author Topic: not move  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
not move
« on: 10 Feb 2005, 17:11:29 »
i have this problem i have it so when the allied tanks get destroyed you request an artillery strike the artillery and scripts work but the condition field of the trigger doesnt ive put (not canmove tank1) and (not canmove tank4)" and so on that usually works but now it doesnt? i think its because that the player has to know that these tanks arent alive but im not sure because it usaully works and the tanks are usually right in front of me but these one arent. ive also tried (can move tank1) but that just activates the scripts straight away.?

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:not move
« Reply #1 on: 10 Feb 2005, 17:27:57 »
Its,

Not (canmove tank1) and not (canmove tank2)

Try it that way.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #2 on: 10 Feb 2005, 18:22:31 »
no tryed that didnt work something like "{count x} not alive tank" would work but im not sure what the exact line is

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #3 on: 10 Feb 2005, 20:13:22 »
wait actually now ive tried it again and this time it worked ive tried to do it again but the tanks keep surviving so im guessing it works but if anyone else has adifferent code line that will be very much apreciated

FLBEE

  • Guest
Re:not move
« Reply #4 on: 11 Feb 2005, 02:37:12 »
dammage 1 = destroyed

in looping script:

#start
?(GetDammage tank1 > .9): goto "next"
~.5
goto "start"

#next
[] exec "artillery.sqs"
exit

in trigger:

(GetDammage tank1 > .9): exec "artillery.sqs"

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #5 on: 11 Feb 2005, 09:30:34 »
how can i link that with all 4 tanks so the artillery activates once all 4 tanks get destroyed because that will activate the artillery after each tanks that gets blown up?

FLBEE

  • Guest
Re:not move
« Reply #6 on: 12 Feb 2005, 03:10:00 »
To accomplish this with 6 triggers:


trigger1:

put over any unit

activated by anyone
condition : this
on activation : tank1dead = false; tank2dead = false; tank3dead = false; tank4dead = fasle

trigger2
activated by none
condition : GetDammage tank1 > .9
on activation : tank1dead = true

trigger3
activated by none
condition : GetDammage tank2 > .9
on activation : tank2dead = true

trigger4
activated by none
condition : GetDammage tank3 > .9
on activation : tank3dead = true

trigger5
activated by none
condition : GetDammage tank4 > .9
on activation : tank4dead = true

trigger6
activated by none
condition : tank1dead and tank2dead and tank3dead and tank4dead
on activation : [] exec "artillery.sqs"

There is a better way to do this-with eventhandler killed i think--but i can't think to put it together right now lol
 ;D





Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:not move
« Reply #7 on: 12 Feb 2005, 05:18:15 »
gawd... that's an awfully cumbersome way of doing things.

Never use getdammage to check if a unit is alive. It's probably about the most unreliable method there is...

Normally I'd say use not (alive unit), but because we're dealing with tanks you're better to use not (canmove tank) or not (canfire tank).

So, in one trigger try this as the condition field:

"not (canmove _x) or not (canfire _x)" count [ tank1, tank2, tank3, tank4, tank5, tank6 ] == 6

That detects when all the tanks are disabled (can't fire or move).
You can have as many tanks as you want in the array, provided you change the number at the end to equal the number in the array ;)

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #8 on: 12 Feb 2005, 10:43:13 »
yep thanks got it working

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #9 on: 12 Feb 2005, 13:56:14 »
right the line that sui mentioned

"not (canmove _x) or not (canfire _x)" count [ tank1, tank2, tank3, tank4, tank5, tank6 ] == 6" isnt working it says theres a local variable in local space and highlights the
"not (canmove _x#"" where that # is is saying where the erroe is well first of all what does the error mean and why is it happening

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:not move
« Reply #10 on: 13 Feb 2005, 00:13:27 »
Are you using the names of the tanks in that array, rather than local variables?

Offline 456820

  • Contributing Member
  • **
Re:not move
« Reply #11 on: 13 Feb 2005, 12:57:09 »
the exact thing i put was not
"(canmove _x) or not (canfire _x)" count [ m1, m2, m3, m4 ] == 4"
and m1 - m4 is the names of the tanks

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:not move
« Reply #12 on: 13 Feb 2005, 14:29:31 »
Hmmmm

You might need to move that quote mark.
The final quote is misplaced:

not"(canmove _x) or not (canfire _x)"count [ m1, m2, m3, m4 ] == 4"

and make it so:

"not (canmove _x) or not (canfire _x)" count [ m1, m2, m3, m4 ] == 4

I think


Planck
I know a little about a lot, and a lot about a little.