Home   Help Search Login Register  

Author Topic: Multiple Radio Triggers...  (Read 1556 times)

0 Members and 1 Guest are viewing this topic.

DeusRich

  • Guest
Multiple Radio Triggers...
« on: 01 Sep 2002, 10:00:22 »
Ok. I am making a monster mission, where you are the high commander (ish). Now, there are due to be several groups you can control:

Infantry 1
Infantry 2
AT 1
Snipers 1
Armored Support (APCs + M60)
Heli Support (3 OH-58)

mow, they are fairly straiightforward, and I have made a radio alpha, beta, charlie, delta etc for each corresponding group. Now I am stuck, I need to be able to give them orders, so my idea was this: For infantry 1, I say Radio Alpha, then it displays a list of 4 more radio commands , still being Radio Alpha, Beta, Charlie, Delta etc.
Im a little confused on how to do this tho.

infantry 1--\-\-\-defend
                 \  \ \attack
                   \  \withdraw
                     \-rendezvous with nearest group

infantry 2--\-\-\-defend
                 \  \ \attack
                   \  \withdraw
                     \-rendezvous with nearest group
etc. etc.
just writing that has given me another idea - to extend it so that i can give him orders to meet up with other friendly groups, or decide what enemy group to attack....

my idea to do this so far, is to have a variable that changes when the first part is activated, so that it knows which trigger to deal with, so I will make 2 Radio Alpha triggers, one which says:

con:this and not inf1

and the other:

con: this and inf1

the only problem with that is I dont know how to make it so that the radio menu stays open, so that it doesnt go and be sloppy by closing when you have chosen your group, and then maybe after choosing another radio command that will lead onto another.

the main thing here, is trying to create a custom command menu, which will be used how I want to use it... I know its quite complex (or not - for some) but I'm not entirely sure how to get it running smoothly...

DeusRich

  • Guest
Re:Multiple Radio Triggers...
« Reply #1 on: 01 Sep 2002, 22:58:56 »
do you understand what I mean? I don't want to be pushy, but im scared of the topic going over to the next page, which is less often checked...

DeusRich

  • Guest
Re:Multiple Radio Triggers...
« Reply #2 on: 02 Sep 2002, 21:11:40 »
so i take it no-body knows a solution? or just nobody has read this post? :) well, if at least you have tried, then that all i ask. Good tidings to you all :)

mikeb

  • Guest
Re:Multiple Radio Triggers...
« Reply #3 on: 03 Sep 2002, 01:23:18 »
Sad to see someone at a loss!

I can find out the answer to this tomorrow morning (if I remember).

Basically it utilises the NULL text which sets a radio message so that you can't use it, and the other setradiomsg commands and a couple of variables.  I'll have a look.

Hopefully, you'l find the answer before then as the main site is meant to come back online v soon (can't wait!!!)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Multiple Radio Triggers...
« Reply #4 on: 03 Sep 2002, 15:18:46 »
I did a very similar (pretty much exactly the same) thing in one of my earlier missions.
Ordinarily, I'd post up the source but I'm afraid I'm on holiday and don't have access to it... It went something like this though (I'll use your first menu as an example, and you can go from there):

Variables

I1menu = false (infantry 1)
I2menu = false (infantry 2)
etc...

Infantry 1 menu Trigger

Radius: 0,0
Condition: Radio Alpha
Condition field: this and (not I1menu) and (not I2menu) and not... etc
OnActivation field: ["I1menu"] exec "Script.sqs"

Infantry 1 menu Item 1 (defend) Trigger

Radius: 0,0
Condition: Radio Alpha
Condition field: this and I1menu
OnActivation field: ["I1defend"] exec "Script.sqs"

Infantry 1 menu Item 2 (attack) Trigger

Radius: 0,0
Condition: Radio Bravo
Condition field: this and I1menu
OnActivation field: ["I1attack"] exec "Script.sqs"

Infantry 1 menu Item 3 (Withdraw) Trigger

Radius: 0,0
Condition: Radio Charlie
Condition field: this and I1menu
OnActivation field: ["I1withdraw"] exec "Script.sqs"

etc... More triggers as required (There will be quite a few of them)

Script.sqs

_call = _this select 0
goto _call
exit

#I1menu
I1menu = true
1 setradiomsg "Infantry 1 >> Defend"
2 setradiomsg "Infantry 1 >> Attack"
3 setradiomsg "Infantry 1 >> Withdraw"
4 setradiomsg "Infantry 1 >> Rendevous with group"
etc... as required
exit

#I1attack
I1menu = false
1 setradiomsg "Infantry 1"
2 setradiomsg "Infantry 2"
3 setradiomsg "AT 1"
4 setradiomsg "Snipers 1"
etc...
Inf1 domove (getpos attackmarker)
etc..
exit

#I1defend
I1menu = false
1 setradiomsg "Infantry 1"
2 setradiomsg "Infantry 2"
3 setradiomsg "AT 1"
4 setradiomsg "Snipers 1"
etc...
"dostop _x" foreach units Inf1
etc..
exit

And so it goes on. That's the way I did it... a very long time ago now. I'm sure if you put your mind to it you can come up with some improvements on that method ;)

As for making the radio menu stay open... I don't think that's possible. It closes when the player executes a radio command

Good Luck :)

mikeb

  • Guest
Re:Multiple Radio Triggers...
« Reply #5 on: 03 Sep 2002, 21:04:59 »
Ah...

Sui has already answered I see.  Well I could have helped you if he wasn't so quick!

This is exactly the sort of thing I was talking about, and explained v well!!


The menu will only stay open, by the way, if you're doing it from the map as opposed to the player screen - as in you see a radio bottom right.
(copy and paste to editing depot someone?!)
« Last Edit: 03 Sep 2002, 21:06:24 by mikeb »