Jump to content
The simFlight Network Forums
nicolas83

Can an axis change its function depending on a button state? #2

Recommended Posts

Hi all,

 

I refer to this post a few years ago.

 

https://forum.simflight.com/topic/70239-can-an-axis-change-its-function-depending-on-a-button-state/?tab=comments#comment-435414

 

I got this working a long time ago in P3D v3. I tried to get it working now in v4 with the A330. I want to assign one axis to the elevator and when on ground to the tiller. I used the multiaxis funtion to change the axis on a button press. Unfortunately it is not working. I used the "Controls List for P3D4 Build 32097.txt" file in the documents folder to find the elevator and tiller axis (throttle 3 axis for the aerosoft airbus) but the axis are not working.

 

If anybody could help me with that I would be very thankful ;-)

 

Best regards

 

Nicolas

Share this post


Link to post
Share on other sites

Hi Nicolas,

1 hour ago, nicolas83 said:

Unfortunately it is not working

what exactly is the problem? Just telling us that it is not working is not very helpful. How are you trying to achieve this - via lua scripts? If so, have you tried log/debugging them?

Please provide more details and also attach your files (lua, ini, log).

Thanks,

John

 

Share this post


Link to post
Share on other sites

Hi John. Thanks for your reply. I used exactly the method described in the post mentioned above. When I assign an axis to the offset dword set command as described the axis does not move in P3D then. I will provide Log, ini and lua in the evening. 

Share this post


Link to post
Share on other sites
2 hours ago, nicolas83 said:

Just tried it with a default aircraft but its also not working. Log, ini and lua are attached.

Well, if you'd have looked in the log, which is where errors would be listed, you would have surely immediatelt seen:

37797 *** LUA Error: F:\P3D\Modules\multiaxis.lua:7: unexpected symbol near '/'
 
Look at the Lua file:

function applyaxis(val)
   cntrl = ipc.readUD(0x66c0)
   ipc.control(cntrl,val)
end

event.param("applyaxis")
[/CODE]

Line 7 is the [/CODE] line. That is NOT a Lua statement. It is evidently the end of a "code" section which you get when using the <> bracketing method (see editing options above). For example, to do this

function applyaxis(val)
   cntrl = ipc.readUD(0x66c0)
   ipc.control(cntrl,val)
end

event.param("applyaxis")
[/CODE]

Please do always look at Log files yourself, and ALWAYS check anything you extract from messages. Don't take things blindly.

Pete

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.