Home   Help Search Login Register  

Author Topic: Detecting you threw a smoke grenade (signaling pickup)  (Read 2247 times)

0 Members and 1 Guest are viewing this topic.

Pigeons

  • Guest
I want a chopper to wait for me to throw a smoke grenade and then move to the position of it..


I searched the forums a bit, and came up empty.. any help would be appreciated.

ilangut

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #1 on: 07 Mar 2003, 10:41:25 »
Dear Dude.

I've already thought about that one and so asked...
Got a reply too  ;)

Here you go:
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=6036;start=0

Pigeons

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #2 on: 07 Mar 2003, 20:20:39 »
Ugh, i dont like when people post scripts assuming I or anyone else knows how to get them to work, everytime i try it it gives me that code error at the top of the screen

i tried both ways, and it still doesnt work..

i renamed my chopper to heli (as in the script) and named me as player

no luck ...  ???

Kaliyuga

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #3 on: 07 Mar 2003, 20:53:21 »
http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_4

go there and download the dynamic helicopter extraction scripts by snYpir

#2 will probably suit you just fine....  ;)

it allows the chopper to come and pick you up anywhere.. via calling one script...

so you just would have to find the right condition to use in regards to your smoke....

if you knew you were only going to use one smoke shell... you could probably  use a condition dependent on you having one less smoke shell than when you started....  and when that condition was met.. the chopper would come in and pick you up



Ace

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #4 on: 07 Mar 2003, 22:16:40 »
BIS in resistance used a mission where troska had to launch a flare and a boat full of ammo would unload its cargo.

I'm looking into that for you

Pigeons

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #5 on: 07 Mar 2003, 22:27:24 »
Thanks Ace, much appreciated..

I'm not saying that the scripts posted by ilangut wont work, im just not sure what to put them in.. aka init field\trigger

and im not sure exactly when to have it exec the .sqs file

« Last Edit: 07 Mar 2003, 22:30:29 by Pigeons »

Ace

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #6 on: 07 Mar 2003, 22:44:54 »
Here is a little experiment i did using a red falre (don't have time to figure out smoke shells yet.)

Basically when you launch the red flare the chopper will land.

Just preview it, it doesn't need executing as Onflare.sqs is like init.sqs, it is detected automatically by OFP but initiated when appropriate (when a red flare is launched)
« Last Edit: 08 Mar 2003, 09:59:50 by Ace »

Pigeons

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #7 on: 08 Mar 2003, 07:48:55 »
uhhhh... im not sure i follow

that has nothing to do with a flare, it just shows some dude pretending to sit in a chair, and answer the phone

I had to change the guys unit name for it to work..



Ace

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #8 on: 08 Mar 2003, 09:59:14 »
Hers the proper file

(i chose phone test instead of flaretest when uploading)

Pigeons

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #9 on: 09 Mar 2003, 18:06:36 »
I tried changing it from "flare" to "smokeshell" and it doesnt work

tried "smokeshellgreen" since that was the color i was using,  and still no dice




supergruntsb78

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #10 on: 17 Mar 2003, 21:18:41 »
i thought it couled be done by using a trigger
in the on condition field you need to right the following

it needs to check the ammo(smokeshellgreen) for "(unitname)" but i cant remeber the right command  >:(   (something like ...
player checkammo smokeshellgreen < 1 (number of smokeshells you have)

then need to sync the trigger with the chopper (our use "heli domove getpos player") something like that  but i cant remember the right command to check the ammo  :'(

i am also in need of a litle help on this matter

Kaliyuga

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #11 on: 17 Mar 2003, 21:52:04 »
 Yeah.. I just tried doing it the way you said Supergrunt....  the code that should work would be something like this:


Condition:
?(officer ammo "SmokeShellGreen" <x)

Activation:
officer sidechat "come get us"

that would activate your trigger that could set the bird in motion to your position using the domove command

now... it all sounds good...  until you get it into the editor...  :-\

so... I set it to where when you had less than 2 smokeshells the sidechat should go off...  and was an officer (which has two smokeshells)

when i started the mission.. the sidechat played....

so I fooled around with the numbers a little bit....

made the condition to where it only went off when you had more than 4 smokeshells..... and it didnt go off when the mission started...

I also tried using:

officer ammo "SmokeShell" ==0  

and the sidechat went off as soon as the mission started...


hope this could be of help to whomever.. but  it is quite frustrating.... ;)

 Aren't there scripts written that do the same sort of thing?  It just may not be possible in the editor for some reason?  
  I dunno.... but good luck


I did just have one last thought....

you could try and use   "Smokeshell" != 2

and this should make the trigger go off if there is any other number than 2 smokeshells on the player

« Last Edit: 17 Mar 2003, 21:56:25 by Kaliyuga »

Kaliyuga

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #12 on: 17 Mar 2003, 22:11:49 »
 OK.. ... hold the phone.. lol ;D

its funny how quickly things can change...

I'm working on a real simple script... basically the one LiquidSilence started...
and should be finished sometime in the next few hours maybe.. ;)

It works right now.. I just have to fix one small error message thats popping up...

get back to you in a bit

;)


Kaliyuga

  • Guest
Re:Detecting you threw a smoke grenade (signaling pickup)
« Reply #13 on: 17 Mar 2003, 23:05:40 »
 Well.. here it is .. get it while It's hot ;)

one example mission......  


 heres the overview:  

you and 3 squaddies on desert isle ,   all named in the editor as you will note... and their group named g

 one blackhawk standing by (very close for the example mission) to pick you up  (named heli)

 one helipad at another location where you will be dropped off ;)
  (named gl)


So heres the jist of it all...  

start the mission... toss a smoke shell.. and the blackhawk will come to pick you up... he will go to your position and hover nearby until you tell your squaddies to get in the chopper.. at which point it will land... wait for everyone to be in (this is why everyone has to be named as well as the group named) ....   and then fly off to the helipad (gl)


Limitations:     The chopper will just hover nearby until you tell your guys to get in.....  so this is best suited for the player as commander ;)  
 I think it's cool anyways.. because the chopper would simply stay aloft for the longest possible time.. until you were ready to get in for sure

Also.. due to the way I am having the chopper get it's landing orders...  do not place the landing helipad within 50 meters of the helicopters flight path on the way for the pick up or else it may go ahead and land without you ;)

  Mission attached.... have fun ... ;)