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? Quote
Ben Russell Posted July 17, 2013 Report Posted July 17, 2013 http://www.xsquawkbox.net/xpsdk/mediawiki/MovingThePlane Quote
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. Quote
Ben Russell Posted July 17, 2013 Report Posted July 17, 2013 set the value every frame? X-Plane has its own personality. Enjoy. Quote
ktACM Posted July 17, 2013 Author Report Posted July 17, 2013 How can I set the value every frame? Quote
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. Quote
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. Quote
Dozer Posted July 18, 2013 Report Posted July 18, 2013 (edited) no text Edited July 21, 2013 by Dozer Quote
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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.