ktACM Posted July 17, 2013 Report Posted July 17, 2013 I wrote a plugin which should set the value of sim/flightmodel/position/psi to 0. I added a new generic trigger and linked the command by using Plane maker. No problem until here. When I click generic trigger it sets it to zero, but when I remove my hand on mouse it again sets it to it's own calculated value. I want psi to remain 0. How can I do this?
Ben Russell Posted July 17, 2013 Report Posted July 17, 2013 http://www.xsquawkbox.net/xpsdk/mediawiki/MovingThePlane
ktACM Posted July 17, 2013 Author Report Posted July 17, 2013 It's ok. But,a = XPLMFindDataRef("sim/flightmodel/position/local_y");XPLMSetDataf(a, 100.0f);,when I write this code it doesn't stay in the sky, it crashes after a while. It means y set once to 100.0f but it changes. I don't want it to change, I want it to remain as 100.0f.
Ben Russell Posted July 17, 2013 Report Posted July 17, 2013 set the value every frame? X-Plane has its own personality. Enjoy.
Ben Russell Posted July 17, 2013 Report Posted July 17, 2013 XPLMRegisterFlightLoopCallback You're going to need to spend some time reading through the X-Plane SDK and testing the examples provided.
ktACM Posted July 18, 2013 Author Report Posted July 18, 2013 XPLMRegisterFlightLoopCallback You're going to need to spend some time reading through the X-Plane SDK and testing the examples provided.I wonder is there any sample code for that? It is not very easy to understand just with the documentation, a sample code would be very useful.
Dozer Posted July 18, 2013 Report Posted July 18, 2013 (edited) no text Edited July 21, 2013 by Dozer
PhM Posted July 21, 2013 Report Posted July 21, 2013 I wonder is there any sample code for that? It is not very easy to understand just with the documentation, a sample code would be very useful.Understanding this will help. PhM
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now