Jump to content

Basic Help: Close / Open all solar panels / Radiators


Recommended Posts

Hi,

I've got this idea to help me start understanding how to mod, can anyone give me any ideas how to open and close all solar panels and radiators?

Thanks

GE

Scenario 1:

GIVEN:

I am on the ground

WHEN:

I am stationary and my solar panels are not open

THEN:

I open all solar panels and radiators

Scenario 2:

GIVEN:

I am on the ground

WHEN:

My speed is > 0 and my solar panels are open

THEN:

I close all solar panels and radiators

Scenario 3:

GIVEN:

I am not on the ground

WHEN:

Atmosphere Pressure > 0 and my solar panels are open

THEN:

I close all solar panels and radiators

Link to comment
Share on other sites

In this case, I will point you to the classic KSP modding trick of looking at another person's code.

One of the biggest benefits of the requirement that all mods post their source, just be aware of the license the mod is released under as you have to respect that when copying code.

In this case, The solar panel action group mod extends and retracts all solar panels with the P key.

Note my comment about the license earlier, this mod is licensed All Rights Reserved so you can't copy it's code. What you can do however is use it to figure out how to interface with the Solar Panels.

As there is no API documentation, looking at other peoples work is one of the few ways we have of figuring out the API and what different commands actually do.

While you want to make conditional triggers, the extending and retracting part should be pretty similar and that should get you going.

D.

Edited by Diazo
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...