Jump to content

PartModule actiongroup


Recommended Posts

I searched a bit on inernet and couldn't find any pertinent information on how to place a custom partmodule action in the action groups.

I have:

[KSPEvent(guiActive = true, guiName = "Activate")]
public void ActivateEvent()
{
StartWarp();
activated = true;
ScreenMessages.PostScreenMessage("Warp Activated!", 5.0f, ScreenMessageStyle.UPPER_CENTER);
Events["ActivateEvent"].active = false;
Events["DeactivateEvent"].active = true;
}

[KSPEvent(guiActive = true, guiName = "Deactivate", active = false)]
public void DeactivateEvent()
{
EndWarp();
activated = false;
ScreenMessages.PostScreenMessage("Warp Deactivated!", 5.0f, ScreenMessageStyle.UPPER_CENTER);
Events["ActivateEvent"].active = true;
Events["DeactivateEvent"].active = false;
}

Is that the only piece of code i need to have?

I'm kind of frustrated to find nothing about that... :/

Thanks for your time.

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...