Home   Help Search Login Register  

Author Topic: Detect Radio Commands  (Read 564 times)

0 Members and 1 Guest are viewing this topic.

TC

  • Guest
Detect Radio Commands
« on: 19 Nov 2005, 22:16:55 »
Hello all

I am making a campaign whereby you play as a group of individuals, with their own different models, voices, faces etc.

These characters now speak idely, react by shouting to grenades, shout abuse at the enemy etc...

However, i wish to be able to disable the radio commands so that no voices are heard over the radio, but i want to detect if a unit has been given an order so that he may actually respond by talking to the commanding unit with the "say" command

Can anyone help?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Detect Radio Commands
« Reply #1 on: 20 Nov 2005, 11:22:34 »
hmmm... how to detect if a loon has been given an order without the aid of the radio chat... usually you just watch him, and if he runs somewhere, or shoots someone, that's how you tell.

how to do it with scripting? tricky. there is the unitready command. as it states, it can be used to halt a script until a unit has finished performing some command, like this

Code: [Select]
unit_name domove getpos player
@unitready unit_name

hint "Hello Sarge, Private Benjamin reporting for duty!"

one way to implement this would be to have a looping script which checks if the unit is ready. if it is, it hasn't been given an order. if it isn't ready, it's in the middle of doing something. you then skip to the part of the script which deals with the command. however, finding out what that command is... i'm afraid i'm stumped on that one...  :-\
« Last Edit: 20 Nov 2005, 11:25:11 by bedges »