Jump to content

Logic for deleting custom radio menu items when used once


Recommended Posts

Posted

I've made two F10 radio commands and associated flags plus "Group resume" so that a unit which is holding will start on its route again on the player's command.

 

However, I cannot remember the little bit of logic involved with getting these items off the F10 radio menu once they've been used. I thought "Radio Item Remove" would do the trick but it asks for text in a data entry field; I dio not know how it can therefore reference the radio command I want to remove.

 

I vaguely remember that using a series of "Increase flag" actions followed by trigger conditions "Flag more than" was the way to delete radio menu items once they've been used by the player but I've fiddled with various combinations to no avail. Can anyone advise? Thanks, as always.

Posted

"Radio Item remove" uses the radio text from the "radio item add" to remove the it from the list. So just copy it from the radio item add trigger into the radio item remove trigger and that should do the trick. Also I'm pretty sure coalitions have to match, but I haven't messed around with radio items lately, so I don't know for sure.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks, gents. The thing that's still eluding me is how to trigger the removal of the radio item, i.e. ideally it should be triggered to the player's action when he activates the menu item, i.e. there's a sequence in which he hits F10, then F1 for the item, then after the menu disappears, only the unused radio items in the F10 sub-menu are still there. I'm not sure how to use flags -- which I assume I need to do -- to accomplish this.

Posted

You can checkout this practice mission I made for combined arms owners. It uses shilkas and vulcans.

 

What you can check out is the trigger logic, the entire mission is based off of flags, radio add and radio remove. The player can pick what units to spawn to try and kill.

 

You don't need to run it, just open it up and check out the logic used for radio add and remove.

 

http://forums.eagle.ru/showpost.php?p=1682814&postcount=16

Posted (edited)

here is a better example than the combined arms mission, check attachment. It's pretty much what grimes said but in mission example.

 

You may have to press your radio twice for F10 - Other to show up (it's a bit buggy when on runway with ATC showing first)

 

so F10 - Other, when player pressed F1 it activates flag 1, so then next trigger is when flag 1 is true, you use radio item remove

radioitemexample.miz

Edited by Quirkitized
Posted

Thank you so much for the useful example .miz files.

 

I have gigured out the "Remove radio item" logic, but am having the most insanely difficult time with the following, associated problem:

 

I can't get my group "Blue Assault helos" to launch on a radio item command.

 

I have used "late activation" and set the activation trigger as an action for radio item #3 (which also generates Flag 3) but the helos show up at the very beginning of the mission and, after starting up, they take off.

 

I want this group to wait on the ground, or not to spawn in, until that player-activated trigger is fired. I'd settle for a long hover with Flag 3 as the stop command, but I have not been able to get that to work either, maybe because helos don't "hold" like aircraft and vehicles.

 

The weird thing is that I've delayed activation to mission time +7 minutes on the AI Hogs and that works perfectly every time: they do not show up on the map until the condition for their activation is met. However, this logic will not work on the helo group.

 

I can finagle the mission so that the helos will only launch when the ingressing A-10shave reached a certain zone on their ingress, but ideally I want the player to make the call to launch the assault helo group.

 

I'm at my wits' end and would be very grateful for any advice.

 

File attached.

Patrol by Force 07.miz

Posted

Check attachment.

 

The problem they were always appearing is this

 

Trigger:

Intialise radio item 03 > part of group in zone > radio item add & group activate (assault helos)

 

so what I did was simply remove the group activate from that, and then you can see I inserted a new trigger called:

 

"Spawn Blue Assault Helos" > Flag is true (3) > Group Activate (Blue assault helos)

 

To get a group to spawn on a radio call, it's simply this

 

Condition = Flag is True (flag# > Group Activate

 

The flag # will never be true until the player hits the corresponding F# key.

Patrol by Force 07-fix.miz

Posted
Thank you, Quirkitized. As always, my logic was flawed. I just don't have a programmer's brain.

 

Don't feel bad. I have only learned all this from going through issues myself. I will say I probably spend 5x more time in mission editor than I do flying :book: :joystick:

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...