Home   Help Search Login Register  

Author Topic: checking if any1 in the squad carries radio  (Read 1333 times)

0 Members and 1 Guest are viewing this topic.

Commando

  • Guest
checking if any1 in the squad carries radio
« on: 26 Apr 2005, 14:00:29 »
Hi im trying to go into using a bit more scripts and im wondering if there is a way to with triggers or scripts that check wich players has the radio?
im using LSR us deltas and the radio is named LSR_prc117new

im trying to see if anyone players or a.i's carry the radio and if so they can call for droping a ammo crate or airsupport. any one have any old script that works in both mp and sp?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:checking if any1 in the squad carries radio
« Reply #1 on: 26 Apr 2005, 15:16:54 »
Code: [Select]
unit hasWeapon weaponName

Operand types:
unit: Object
weaponName: String
Type of returned value:
Boolean
Description:
Check if unit has given weapon.

Example:
player hasWeapon "M16"

:beat: *Gets Shot* :beat:

Commando

  • Guest
Re:checking if any1 in the squad carries radio
« Reply #2 on: 26 Apr 2005, 17:05:18 »
hehe thx Dmakatra!  :) I'll see if i just can get my hands on a nice ammo crate drop script from somewhere  :D tried one that i found in the editors depot but it required some old addon planes, and well i want to find something for once that don't add more addon planes  ;D

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:checking if any1 in the squad carries radio
« Reply #3 on: 26 Apr 2005, 22:59:17 »
The condition for a script/trigger to see if anyone in a group has that radio would look like this:

({_x hasweapon "LSR_prc117new"} count units groupname) > 0

I've got an ammocrate drop script that would be usable, with a tad bit of modification. I'll post it later when I'm home.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Morglor9

  • Members
  • *
Re:checking if any1 in the squad carries radio
« Reply #4 on: 26 Apr 2005, 23:03:38 »
while we're on the topic of radios, does anyone know where there is a good radio download. i was thinking of using it in a mission, and now that i know the code, i need a radio.
Cymbaline

Commando

  • Guest
Re:checking if any1 in the squad carries radio
« Reply #5 on: 26 Apr 2005, 23:59:32 »
i ahven't seen any single radios that have been reased, but they suually come with addon trop packs, like BAS soldiers, ORCS russian troops, LSR US rangers / deltas  ;)
its usually carried in the slot where you have a LAW or other heavy weapon  ;)
then the big thingy is of course to add the whole call in a crate to be droped with the radio im wonder about, if it can be done with pressing the fire when you are equiped with it or just with a action menu entry  ???

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:checking if any1 in the squad carries radio
« Reply #6 on: 27 Apr 2005, 00:06:47 »
You can do it by action menu, or by radio-call.

AFAIK the fire trigger for the radio could only produce some
radio noise included with the addon itself, but no further use
of it has come to my attention yet, as eventhandler "fired"
doesn't catch the fire trigger from a radio addon.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Commando

  • Guest
Re:checking if any1 in the squad carries radio
« Reply #7 on: 27 Apr 2005, 02:02:45 »
i tried the bas mission BAS_TSF_CloseToHome by Nagual and it has a pretty advanced SATCOm radio that can be used to call in either a su-25 or a mi-24 to do CAS, very high tech stuff, some dialogues and scripts i have found , but im not sure what is working togheter with what so im not sure yet what to copy n paste if i can even do that or if the scripts somehow are built into the bas radio too , but i feel i have started to unwrap the mystery a lill' bit more than i had a couple of days ago anywas  ;D

Update! I got Naguals Satcom CAS radio script working in my mission, but.. the A10 needs a runway to take off from and the only a.i workable runway is currently occupied by the russians and when i try to place the start location of the A10 somewhere else like on the other airfield it drives down in the sea or hits a tree and gets itself blown up
  :P but hey i got a apache that can be called upon, and so far the leader of the squad is the only one that can use the radio to call for CAS, and he has to be equiped with it but its a way cool feature anyways, will give nagual credits for that in the readme  :)
« Last Edit: 27 Apr 2005, 04:31:58 by Commando »