Jump to content

Search the Community

Showing results for tags 'kspevent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 1
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 3 results

  1. I have a KSPField with the UI_ChooseOption user interface attached. Now I would really like to make it so, that it was only available on EVA. However, it turns out the KSPField does not have that feature, but UI_ChooseOption cannot be used with KSPEvents since it will not accept a method.... What can be done. I considered simply hiding the UI in flight unless I was on EVA. However, I am not sure how to do that. Does anybody know a nice way to have the above, or something similar to be bound to EVA. Alternatively, can anybody advice on how to detect EVA? And which events to subscribe to to detect it.
  2. Hello everyone, I have a question about IVA animation/rotation. Is it possible to rotate / animate the origin of an InternalModule through a KSPEvent tied to a PartModule? The reason why I'm asking this is one, I'm very new to plugin development (very ignorant about what's possible or not), and two, I don't want to waste time trying to solve the impossible since this is the only reason I have to learn plugin development. For context, let me explain what I'm attempting to do. The plugin I'm trying to write is a PartModule called ModuleCentrifuge. I would like to (ideally) define a KSPField public integer called rotationalVelocity which defines the speed of rotation for the centrifuge animation. It is important that the craft be rotated through animation in a non-physical manner, to avoid physics calculations. A animation is then defined which rotates the part along the y axis (up / down in the VAB) as well as an expected attached internal space Another KSPField public float called ecRate defines the amount of electric charge consumed when the centrifuge rotates. Two KSPEvents are defined which are called "Start Centrifuge" and "Stop Centrifuge" which starts or stops the rotation of both the PartModule and InternalModule The impetus for creating this plugin, is to facilitate proper window view orientation in rotating centrifuge habitat IVAs. Any help / clarity / advice would be very much appreciated! EDIT: After teaching myself enough about both c# and the KSP plugin API, I have determined that, yes, everything I wanted to achieve is possible. Instead of rotational velocity I used rotational degrees per second (well, actually rotations per minute divided by 60). instead of two separate KSPEvents I use one to toggle between start and stop states utilizing Events["nameOfEvent"].guiName = "newGuiName" rotating the external model is accomplished by accessing the parent Part class, part.FindModelTransform(name of transform), assigning the found transform to a variable and then using Transform.Rotate(0, angle, 0) rotating the internalModel is accomplished by accessing the parent Part class child object internalModel which has the same method of FindModelTransform, so part.internalModel.FindModelTransform both the external model and internal model are accessible from within the partModule class, so there's no need to mess around with making a separate instance of internalModel.
  3. For All Y'All I'm thinking of tightening up the UI a bit, to allow both more (and more varied) functionality and less spam of lines in the right-click menu. I already feel bad that I add 2 lines per part, and any more functionality could increase that even more. Ideally, I'd like to modify (or replace) the current single line to keep things tighter and easier to use. A picture is worth a thousand words, so in lieu of writing 3,000 words here's what I want in simple pictures: What KSP Does Now What All Y'All Does Now What I Want All Y'All To Do I THINK that what I need to do is remove the current KSPEvent that implements "Extend Panels" (which I don't know how to do) and add my own KSPEvent-type-thing that implements the original functional button and also adds the two new buttons that do their jobs (which I also don't know how to do). Could anybody offer any pointers on any of these things? I've got the "how do you extend all panels" and "how do you extend all of the same panels" part, but not the "how do you modify the UI to put buttons where I want them" part.
×
×
  • Create New...