This are the Support Forums for FSUIPC and related products.
These forums replace the old support forums which have been running for 20+ years. The old forums contain a wealth of information on all FSUIPC products, but are now no longer available.
Please note that you will need to Register and Login to post for support, and also to download attachments. You can view these forums without registering.
Support is also available via Discord. Please use the following invite link to join the FSUIPC Discord server:
https://discord.gg/zjwUTrxmmE
[Solved] InputEventOffsets and HTML event
Hi There,
Is there a way to bind an HTML Event (namely a H:BKSQ_FAILURE_.... event) to a FSUIPC Offset ?
The only options stated in the advanced user manual are I: or B: when editing the InputEventOffsets section of the ini file
Thank you in advance for your help on that matter !
Regards,
Francois
No, you cannot do this. And I don't see why you would want to do this. HTML events are that - events, which you trigger. They have no value. What is the point of adding them to an offset?
Note also that you can trigger html-events (hvars) by writing to offset 0x7C50 - see the Offset Status document for details. And the standard way to assign to trigger an hvar would be to create a preset or macro entry to trigger the hvar and then assign to that.
John
Thank you, John, for your answer.
To make a long story short, I use an Instructor Station App (FS-FlightControl) which is very convenient for me using my King Air Homecockpit.
I can trigger custom made failures but only using simconnect events or FSUIPC Offsets whereas the Black Square Analog King Air I fly just takes HTML events.
So my point is to use a FSUIPC Offset (which I can trigger from FS-FlightControl) to trigger a H: event in FSUIPC to get a specific failure when flying the BKSQ King Air, hope it is clear enough....
By reading your advanced manual I secceeded in adding the HTML event to FSUIPC Preset, what I would like to do now is to run it when an offset (let say 0xA000) is set to 1.
Any chance ?
Posted by: @altackBy reading your advanced manual I secceeded in adding the HTML event to FSUIPC Preset, what I would like to do now is to run it when an offset (let say 0xA000) is set to 1.
Any chance ?
As I said, the easiest way to trigger it would be to write the hvar name (preceded by 'H:') to offset 0x7C50.
But if you want it triggered when any other offset is updated, you would need a simple lua script. The script just needs an event.offset call and the handling function to set the hvar, e.g.
function activateHvar(offset, value)
if value ~= 0 then -- offset non-zero: activate hvar and clear offset
-- the following call will only work if the hvar name is known to FSUIPC
-- ipc.activateHvar("H:varName")
-- this will work regardless of if the hvar name is known or not
ipc.execCalcCode("(>H:varName)")
-- Rest the offset value back to 0
ipc.writeUB(offset, 0)
end
end
event.offset(0xA000, "UB", "activateHvar")
ipc.log("Script to activate hvars on offset 0xA000 update is now running")The script (of course) needs to be running. The easiest way to do this is to have it started automatically - see the section Automatic running of Macros or Lua plugins on page 40 of the Advanced User guide on how to do this.
John
