Home   Help Search Login Register  

Author Topic: snYpir's helo extraction script -05v4  (Read 1171 times)

0 Members and 1 Guest are viewing this topic.

n0mad

  • Guest
snYpir's helo extraction script -05v4
« on: 05 Jun 2003, 00:24:42 »
Hi,

I'm wondering if anyone could save me some trial and error time with a mission I'm currently playing around with.

I'm using a modified version of Snypir's helo extraction script v 4.0 (available here).  I really like the script, and the only modifications I'm attempting to do, is to make the helicopter spawn instead of hanging out someplace in the periphery until the mission is complete.

What I need help with is with having more than one soldier be able to toss a smoke shell when the player calls in the helo-evac.  In other words, does anyone know the string to use to say if pleb is dead, then pleb1 throws the smokeshell, or if pleb and pleb1 are dead, then pleb2 do it.  Obviously this is not necessary to the function of the script, but it would make the end result look a lot better if someone threw the smoke marker.

thanx in advance

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:snYpir's helo extraction script -05v4
« Reply #1 on: 05 Jun 2003, 00:26:29 »
welll... how about making the group leader throw the smoke? then its very easy because all u need is one line:

(leader groupname) fire ["throw", "smoke....... ]

whoever the leader is, he will throw the smoke... v handy
Proud Member of the Volunteer Commando Battalion

n0mad

  • Guest
Re:snYpir's helo extraction script -05v4
« Reply #2 on: 05 Jun 2003, 00:33:37 »
Messiah,  (man, you're fast on the reply!  I just had time to browse gen announcements)

Thanks, I thought of that, too, but the group leader here is also the player, and I was hoping (for the visual effect) to have one of the grunts do it.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:snYpir's helo extraction script -05v4
« Reply #3 on: 05 Jun 2003, 00:37:54 »
hmmmm, ok... well its easily scripted... but not by myself who is very clueless about scripting... i know its an easy script, so any1 who has knowledge should be able to give u an example soon.

good luck :thumbsup:
Proud Member of the Volunteer Commando Battalion

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:snYpir's helo extraction script -05v4
« Reply #4 on: 05 Jun 2003, 00:46:01 »
As Messiah implied, for a nice effect I'd use one of the coloured smokeshells.

You'll need to name all the loons in the group and make sure they all have one smoke.   The odds are the player will remove their smoke at gear selection or while rearming during the mission so you'll need to provide clear instructions or appropriate scripting.  

This "script-sketch" is messy and inelegant but its a start.

?alive loon1: goto "loon1"
?alive loon2: goto "loon2"

#loon1
loon1 fire [ etc
exit

#loon2
loon2 fire [etc
exit

and so on.     You should really add checks to make sure the loon is in the vicinity of the player and has a smoke grenade.  

You'll also need to deal with all the loons being dead or there being no smoke grenades available.      If the player screws up in this regard you could punish him by Papa Bear telling him he has to run to the other side of the island to make the mission end.  Whatever, just make sure you cover every possibility.

You could clean up the script by making an array of the units in the group who are alive and close to the player and have a smoke grenade, and then just selecting the first unit in the array.   Don't ask me about the syntax for all of that.
Plenty of reviewed ArmA missions for you to play

n0mad

  • Guest
Re:snYpir's helo extraction script -05v4
« Reply #5 on: 05 Jun 2003, 02:09:58 »
Macguba -

I think you've given me the solution, but I'm going to keep the topic open until I've given it a try.  I think this will be an easy insertion into snypir's fine script.  I knew it could be solved with a "?alive" string, but couldn't remember the syntax for the life of me.

BTW - he's defaulted the smokeshells in his example as green, but I've changed them to red as it's a SEB_Nam pack mission (lots of greenery already!)


Thanks tons.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:snYpir's helo extraction script -05v4
« Reply #6 on: 05 Jun 2003, 10:55:36 »
Quite right - you shouldn't solve a topic until you have completed solved the problem and tested the solution until you are happy with it.

Plenty of reviewed ArmA missions for you to play

n0mad

  • Guest
Re:snYpir's helo extraction script -05v4
« Reply #7 on: 06 Jun 2003, 02:51:49 »
All right, let's check this one off as solved.

What I did:

Snypir's got a trigger set to radio channel alpha with the following in the activation field:
"pleb fire [""throw"",""SmokeShellGreen"",""SmokeShellGreen""]; [pleb,uh601,waypoint_marker,[0,0],""SOUTH"",500,hpad] exec ""chopper_pickup.sqs""

I've removed the first string ("pleb fire [ etc.") and replaced it with "[] exec "pleb.sqs" and "pleb.sqs" is made of the following:

?alive pleb1: goto "pleb1"
?alive pleb2: goto "pleb2"
?alive pleb3: goto "pleb3"

#pleb1
pleb1 Fire ["Throw","SmokeShellRed","SmokeShellRed"]
goto "end"
                   

#pleb2
pleb2 Fire ["Throw","SmokeShellRed","SmokeShellRed"]
goto "end"

#pleb3
pleb3 Fire ["Throw","SmokeShellRed","SmokeShellRed"]
goto "end"

#end
exit

It's a small script file, and while "inelegant" it functions fine.

Thanks for the assistance, chaps.