Home   Help Search Login Register  

Author Topic: Still looking for...............  (Read 1386 times)

0 Members and 1 Guest are viewing this topic.

sgtGunneryHighway

  • Guest
Still looking for...............
« on: 22 Oct 2002, 17:41:32 »
I m still looking for a way to how detect when a flare or smoke shell are fired or not
is there a simple command to check that in the condition field (without script if its possible)?
i ve trying a sefe's script but it seems obsolete cuz he use the "nearest object" command (someone tell me she's no longer working on v1.75 and more) and this one activate the trigger imediately on mission starting
Quote
Hmm.... you could name the unit that will be firing the smoke shell... then use this in a trigger:

condition: unitname ammo "smokeshell" < x

where x is the number of smokeshells he starts with... since the AI never fire smoke unless you tell em to... (in my experience) you can count on him having the full amount until you tell em to fire one off... if the player will be firing  smoke, just give em a limited number..
or maybe its only working with ai dunno
whatever
i need a command who working with the player
so if you know what i need please post
thanks

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Still looking for...............
« Reply #1 on: 22 Oct 2002, 18:23:15 »
nearest object works now in 1.85 but you can use a inbuilt thingy in 1.75 called onflare.sqs just put what you want to happen in there, then when you fire a flare the script will activate.

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #2 on: 22 Oct 2002, 20:01:27 »
Quote
you can use a inbuilt thingy in 1.75 called onflare.sqs just put what you want to happen in there, then when you fire a flare the script will activate.
if you talking about "Contaband" mission i ve already trying to use that script but i cant find how call that script in the mission and when i try to simply fire a flare nothing happen can you help me?
« Last Edit: 22 Oct 2002, 20:03:44 by sgtGunneryHighway »

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #3 on: 22 Oct 2002, 20:10:12 »
Quote
; Flare detection

? Fired : exit

? ((_this select 0) select 0) != 1 : exit
? ((_this select 0) select 1) != 0 : exit
? ((_this select 0) select 2) != 0 : exit

? (_this select 1) != aP : exit

; OK - it's player and it's a red flare

GoAttack = true;
"1" objStatus "Done";
Fired = true;
is this what you talking about?

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #4 on: 23 Oct 2002, 22:45:42 »
? :'(

Kaliyuga

  • Guest
Re:Still looking for...............
« Reply #5 on: 24 Oct 2002, 03:06:29 »
  Well.. the easiest way to call a script.... would be to put this in the player's init field:

[] exec "onflare.sqs"

But that bit you have there doesn't look like it to me...

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Still looking for...............
« Reply #6 on: 24 Oct 2002, 11:44:34 »
you don't need to execute this script at all, when a flare is fired the game will execute it, the script that BIS wrote just checks if the player fired the flare and if it was the right colour. So you can pu twhatever you want in the script but you'll want to keep thi sbit otherwise it will activate each time a flare is fired.


? Fired : exit

; rest of script

Fired = true;

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #7 on: 24 Oct 2002, 22:40:03 »
an important thing to know about that is : the script seems dont work in editor you must export on single mission or multi etc......
and the last thing i need to know is :
   what is the value for detecting if its a red flare or green and if its possible to modify the script for detect a smoke shell? ???

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #8 on: 26 Oct 2002, 00:12:09 »
if someone know please post :help:

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Still looking for...............
« Reply #9 on: 26 Oct 2002, 21:12:27 »
to detect if its green change the script to this

? Fired : exit

? ((_this select 0) select 0) != 0 : exit
? ((_this select 0) select 1) != 1 : exit
? ((_this select 0) select 2) != 0 : exit

? (_this select 1) != Player : exit

Fired = true;

I'll have a look later about the smoke but I doubt it will work

sgtGunneryHighway

  • Guest
Re:Still looking for...............
« Reply #10 on: 26 Oct 2002, 22:29:47 »
tnx m8 you tha king  :cheers: