Definitely.Caldemeyn wrote:Well, one would think that having options at your disposal is A2A's way, having this system would only better the plane.
Oxygen?
- CaptKornDog
- Airman First Class
- Posts: 67
- Joined: 28 Nov 2013, 22:47
Re: Oxygen?
- CaptKornDog
- Airman First Class
- Posts: 67
- Joined: 28 Nov 2013, 22:47
Re: Oxygen?
Anyone know of aircraft edits that may be able to force hypoxia to disabled? I've been looking but can't seem to find anything.
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
Using FSUIPC, you could certainly modulate the "L:OxyBloodLevel" L:Var, keeping it at (or close to) 100 via a Lua plug-in or something. Not sure if there any other ways to go about 'overcoming' the hypoxia effect which don't rely on owning a registered copy of FSUIPC.CaptKornDog wrote:Anyone know of aircraft edits that may be able to force hypoxia to disabled?
Nick
- CaptKornDog
- Airman First Class
- Posts: 67
- Joined: 28 Nov 2013, 22:47
Re: Oxygen?
Could you elaborate? I've never used Lua.Nick M wrote:Using FSUIPC, you could certainly modulate the "L:OxyBloodLevel" L:Var, keeping it at (or close to) 100 via a Lua plug-in or something. Not sure if there any other ways to go about 'overcoming' the hypoxia effect which don't rely on owning a registered copy of FSUIPC.CaptKornDog wrote:Anyone know of aircraft edits that may be able to force hypoxia to disabled?
Nick
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
Yeah, sure. I'd never created a Lua script either, but I did have a little play with this earlier in case anyone asked!CaptKornDog wrote:Could you elaborate? I've never used Lua.
In its simplest form you could just use something like...
Code: Select all
-- Loop until stopped with LuaKill
while 1 do
-- Set blood oxygen saturation at 100%
ipc.writeLvar('L:OxyBloodLevel', 100)
end
However, you could elaborate on this a bit to create a slightly more authentic 'magic cannula' effect which periodically tops up the blood oxygen level. (Magic, inasmuch as it doesn't need an oxygen supply and never runs out!) A script like this for example should do the trick...
Code: Select all
-- Loop until stopped with LuaKill
while 1 do
-- Pause for 10 seconds
ipc.sleep(10000)
BloodOxy = ipc.readLvar("OxyBloodLevel")
if BloodOxy < 90 then
-- Increase blood oxygen saturation by 4%
ipc.writeLvar('L:OxyBloodLevel', BloodOxy + 4)
end
end
Of course, this is no substitute for a proper A2A simulated oxygen delivery system but in the meantime it should allow you to reach the service ceiling of the Comanche without blacking out. It should work with the rest of the A2A GA fleet too.
Cheers,
Nick
P.S. Hope it's okay with the A2A guys to describe this little cheat for FSUIPC users. If any Lua gurus have suggestions for a better script, please be my guest.
- CaptKornDog
- Airman First Class
- Posts: 67
- Joined: 28 Nov 2013, 22:47
Re: Oxygen?
Thank you. Is there a way to display a momentary message or indication that the LUA script is actually on/active?Nick M wrote:Yeah, sure. I'd never created a Lua script either, but I did have a little play with this earlier in case anyone asked!CaptKornDog wrote:Could you elaborate? I've never used Lua.
In its simplest form you could just use something like...Once started, this script should keep the "OxyBloodLevel" L:Var permanently at 100, effectively disabling the A2A hypoxia simulation.Code: Select all
-- Loop until stopped with LuaKill while 1 do -- Set blood oxygen saturation at 100% ipc.writeLvar('L:OxyBloodLevel', 100) end
However, you could elaborate on this a bit to create a slightly more authentic 'magic cannula' effect which periodically tops up the blood oxygen level. (Magic, inasmuch as it doesn't need an oxygen supply and never runs out!) A script like this for example should do the trick...Basically, all you'll need to do is create a text file containing the above text, rename it with the ".Lua" extension, e.g. "Oxycheat.lua" and drop it into your "Modules" directory. Then start the host sim, and in FSUIPC assign a button or keystroke for "Lua Oxycheat" (to turn it on) and another for "LuaKill Oxycheat" (to stop it).Code: Select all
-- Loop until stopped with LuaKill while 1 do -- Pause for 10 seconds ipc.sleep(10000) BloodOxy = ipc.readLvar("OxyBloodLevel") if BloodOxy < 90 then -- Increase blood oxygen saturation by 4% ipc.writeLvar('L:OxyBloodLevel', BloodOxy + 4) end end
Of course, this is no substitute for a proper A2A simulated oxygen delivery system but in the meantime it should allow you to reach the service ceiling of the Comanche without blacking out. It should work with the rest of the A2A GA fleet too.
Cheers,
Nick
P.S. Hope it's okay with the A2A guys to describe this little cheat for FSUIPC users. If any Lua gurus have suggestions for a better script, please be my guest.
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
Yeah, I believe it would be possible to add something like that using the ipc.linedisplay function (or offset 3380). I'm working away from home for the next week or so but I'll try and take a look when I get a few moments next month...
Cheers,
Nick
Cheers,
Nick
- renaissanceman
- Technical Sergeant
- Posts: 597
- Joined: 13 Apr 2008, 08:29
- Location: Bedford, Texas
Re: Oxygen?
Hi Capt,CaptKornDog wrote:
Thank you. Is there a way to display a momentary message or indication that the LUA script is actually on/active?
Creating a display in a Lua script is pretty easy. I'm just scratching the surface of Lua but here is a script I use to monitor my strobe lights and display the status:
Code: Select all
-- A2A_PA24_StrobeStatus.lua
-- Reads value of L:StrobeLightSwitch and displays On or Off
function dispStrobe(Lvar, val)
ipc.setowndisplay("Strobe Light", 15, 5, 25, 5) -- Set size and location of display window titled Strobe Light
StrobeVal=val -- Pass StrobeLightSwitch value to 'StrobeVal' variable
if StrobeVal == 0 then
ipc.display("Strobe Light Off", 5) -- Display text for 5 sec
end
if StrobeVal == 1 then
ipc.display("Strobe Light On", 5) -- Display text for 5 sec
end
end
event.Lvar("L:StrobeLightSwitch",2000,"dispStrobe") -- Read Lvar 'L:StrobeLightSwitch' and pass value to 'dispStrobe' function above
Hope this helps,
Jim
i7-6700K @ 4.0 GHz | ASUS Maximus VIII Formula | 32 GB DDR4 | EVGA GeForce GTX 980TI Classified |
Win 10 Pro 64 | FSX SE | Registered FSUIPC | All Accu-Sim Birds | Accu-Feel v2 | TrackIR5 | AS16 | PRO-ATC/X
Win 10 Pro 64 | FSX SE | Registered FSUIPC | All Accu-Sim Birds | Accu-Feel v2 | TrackIR5 | AS16 | PRO-ATC/X
- CaptKornDog
- Airman First Class
- Posts: 67
- Joined: 28 Nov 2013, 22:47
Re: Oxygen?
Thank you.Nick M wrote:Yeah, I believe it would be possible to add something like that using the ipc.linedisplay function (or offset 3380). I'm working away from home for the next week or so but I'll try and take a look when I get a few moments next month...
Cheers,
Nick
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
The method that Jim posted above should work fine CaptKD. You'd just need to to edit the script as follows...
Cheers,
Nick
Code: Select all
ipc.display("Magic Oxygen Supply Active", 4) -- Display text for 4 seconds
while 1 do -- Loop until stopped with LuaKill
-- Pause for 10 seconds
ipc.sleep(10000)
BloodOxy = ipc.readLvar("OxyBloodLevel")
if BloodOxy < 90 then
-- Increase blood oxygen saturation by 4%
ipc.writeLvar('L:OxyBloodLevel', BloodOxy + 4)
end
end
Nick
Re: Oxygen?
Works like a charm, thank you so much guys! Just tested, spending 60 minutes at FL160 holding at SNU VOR near LOWW! Just to make it "complete" is there any chance to add an "Oxygen Supply Off" message to display for 4 seconds when turning it off (since there is a message displayed when turning it on, it would be nice to have one when deactivating, too).
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
Glad you found it helpful. I'm not sure it's possible to add a deactivation message to the script above though. That's because it's disabled by simply 'killing' the entire Lua. As mentioned above, I'm very much a Lua novice and this is the first/only time I've experimented with it. Maybe one of the other guys such as Paul S ("Gypsy Baron") who is a Lua expert will be able to suggest something?
Cheers,
Nick
Cheers,
Nick
Re: Oxygen?
In my a2a comanche home cockpit Im building Im going to add a oxygen tank in a similar way.
The tank will fill everytime you are in ground.
With a switch (a real one) you open the valve and a indicator (real led lights) show you how many oxygen is in tank. It can be programed to last the time needed. I dont know how many time is the usual.
The realair lancair v2 has this system simulated. I will study those variables to do something similar.
I think that better than "while 1 do..." is to use the event.Lvar function
I have working in something quite similar right now.
I have made a bendix king KA51b free-slave switch which is used with and bendix king hsi. All synchro with a2a comanche.
In slave mode, with lua programming, drift variable is decreasing little by little (at real world correction rate).
I can show it here if you want.
Lua rocks!
The tank will fill everytime you are in ground.
With a switch (a real one) you open the valve and a indicator (real led lights) show you how many oxygen is in tank. It can be programed to last the time needed. I dont know how many time is the usual.
The realair lancair v2 has this system simulated. I will study those variables to do something similar.
I think that better than "while 1 do..." is to use the event.Lvar function
I have working in something quite similar right now.
I have made a bendix king KA51b free-slave switch which is used with and bendix king hsi. All synchro with a2a comanche.
In slave mode, with lua programming, drift variable is decreasing little by little (at real world correction rate).
I can show it here if you want.
Lua rocks!
- Nick - A2A
- A2A Captain
- Posts: 13799
- Joined: 06 Jun 2014, 13:06
- Location: UK
Re: Oxygen?
Yes please! It sounds great.alioth wrote:I can show it here if you want.
Thanks,
Nick
Re: Oxygen?
I have a suggestion. (Don't hit me please)
An addon.
Can you imagine going to your favorite flight shop and buying a three dollar O2 addon?
An addon.
Can you imagine going to your favorite flight shop and buying a three dollar O2 addon?
"Spring Chicken to Shite Hawk in one easy lesson...taka taka taka taka..."
Who is online
Users browsing this forum: No registered users and 14 guests