Jump to content

Any way to create Radio Freq Condition?


luza

Recommended Posts

Anyway to have the following trigger setup?

 

Once1 unit inzone (player) Action:

Radio set to 40FM Text Send MSG

Flag on.

 

 

I guess I'm asking if it is possible to make tuning to a frequency a condition :D


Edited by luza

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I posted a sample mission of something similar to this in the past, but the link is dead. So, I whipped up a quick sample (attached) to do what you want. Details are in the brief.

 

Check the following link to see more info and lists in addition to the mainpanel_init.lua as EB has suggested.

 

http://forums.eagle.ru/showthread.php?t=76289&highlight=cockpit+arguments

Radio_Tune_Template.miz

Link to comment
Share on other sites

luza, after reading your post again, I hope I understood you correctly. Obviously, you'll have to manually tune the radio to frequency VHF FM 40.000.

The Radio_Tune_WP1.miz will only tune when you're in WP1. I'm not sure if you can make a trigger that manipulates cockpit arguments automatically. However, a script to do just that may be possible. Unfortunately, if it's possible, I don't know how.

Radio_Tune_WP1.miz

Link to comment
Share on other sites

Thanks Ordain for your mission this is EXACTLY what I'm looking for.

 

I understand how to find the "arguements" but I don't understand how the values work for frequency? How do I go about figuring this out?

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Here's my interpretation of how I "think" it works.

 

Open the mainpanel_init.lua in notepad++ and scroll down to line 990 for example.

The criteria for VHF FM Radio (VHF_radio.FM) will show the argument number. OK. Simple enough, but here's where simplicity ends for me.

The first window representing hundreds/tens frequency is default at "3" when the sim starts.

From the mainpanel_init.lua we can extrapolate that argument 157 represents the number and argument 153 represents the button.

That number goes from 3-15. Which means there is a total of 13 possible positions for that argument.

The default position is usually interpreted as "0", the second position as ".1" the third as ".2" and so on. If we follow this pattern, to "call" the proper argument we need to figure out which one it is within the possible choices (3-15).

 

Since we want the hundereds/tens argument to respond when we select "4" (40.000) we know that "4" would be the second one in the series, i.e. (3,4,5, on up to 15). In this case (3-15) since "3" is the first value, "3" represents 0, "4" represents .1, "5" represents .2, and so on.

 

Now, to call (trigger) the argument at "3" we would set our parameters between -0.5 and 0.5, since that value translates to 0. If you click the arrows next to the dialog box, it will cycle in increments of .5. But, since we want to call "4" we need to select the second value in the series. Therefore, we set our value to trigger between 0.5 and 0.15, since the value "4" is the second value in the series translated as .1.

 

So, to select "4" it should look like this:

Type: X:Cockpit argument in range

Argument: 153

Min: 0.5

Max: 0.15

 

Hope that makes sense. Some trial and error will usually be necessary. I don't fully understand the follow up values in the mainpanel_init.lua.

If you look at line 990 again, what I do understand is that (157) is the window representation, (153) is the button representation, and (15) is the highest value for that selection.

As far as the 0.9 and the 0 go, I can only assume that they give a hint of the translation sequence. This part I don't fully understand, since there are only 13 total values for this argument.

If I had to guess, I would say the 0 represents the lowest value in the sequence and the 0.9 gives a hint of how the sequence procedes. In this case, in tenths.

You may also have noticed that in the sample mission, I used the button arguments instead of the window wheel arguments, but it may have worked using 157 instead of 153 for the "4" frequency selection. I didn't try it, because 153 worked fine.

Again, some trial and error may be necessary. I'm certainly not a LUA expert, but I get lucky sometimes.:thumbup:

 

Be sure to take a look at the Cockpit_arguments_A-10C.doc which you can find from one of the previous links. The spreadsheet contained in that file is what initially put me on the path to figuring some of this stuff out.

Link to comment
Share on other sites

I think I kind of get it, but I still don't understand by that logic how 12 Different positions is determined by max value of 1.0. Is it found by dividing 1.0 by the 12 posible switch positions?

 

My brain hurts :(

 

 

Edit: Could you try listing how you would hit Freq's 30 40 50 60, or something so maybe I can see the pattern and understand :P


Edited by luza

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

All animations are drawn on a scale of 0 - 1 (or sometimes -1 - 1). For example if we imagine a gauge that indicates values form 0 to 100 in the cockpit, a reading of 50 in the cockpit would mean the animation argument is at 0.5.

 

I understand that part of it. I just can't figure out the logic in what values give 40.00.00 and why. Or any other freq (switch positions) for that matter:huh:

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Evil, I got it working flawlessly thanks again, now out of curiousity is there a way to make the condition work for certain aircraft (Multiplayer multiple aircraft scenario) Because as I understand it it checks every bodies frequencies?

 

Conditions

Hawg1 inzone

Parameter = VHF_FM 30.000000

 

[Or]

 

Hawg2 inzone

Parameter = VHF_FM 30.000000

 

I mean that if player 1 was inzone on wrong freq, but player 2 was out of zone, and on freq 30 FM, it would still trigger.

Do you see my point? :)

 

TL;DR:

Is there a way to make the condition Client specific?


Edited by luza

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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