Not logged inOpenClonk Forum
Up Topic [QUESTION] Potion brewing

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Sayned
Alchemy works fine, but I have got another question when was making one of my maps.

I throught that this question is too small for new topic, so I write it here.

I started making another map and almost finished it. Then I realized that stars from OC may cause giant lags so there must be way to remove them. I have realized that all I need to do is to make a menu like it was in one mappack from CR and place here option, which will allow host remove stars from map. I have made menu, I have made two menu items: "Stars On/Off", "Ok". But they don't work.

Code looks like that:
protected func InitializePlayer(int plr)
{
  if(plr==0)
    {
      var menu = CreateObject(Rock, LandscapeWidth()/2, LandscapeHeight()/2+150);
      SetCursor(plr, menu);
      menu.Visibility = VIS_None;
      menu->CreateMenu(WaterGuardSpell, nil, nil, "Options", nil, nil, true);
      menu->AddMenuItem("Stars (may cause lags)", "PlaceStars", AirGuardSpell);
      menu->AddMenuItem("Ok", "Done", Icon_Ok);
    }
  //SetPlayerZoomByViewRange(plr, LandscapeWidth(), 0, PLRZOOM_LimitMax);
  SetPlayerZoomByViewRange(plr, 0, LandscapeHeight(), PLRZOOM_LimitMax);
  SetPlayerViewLock(plr, true);
  return JoinPlayer(plr);
}


When I open my scenario I can see menu with both items in, but when I try to click them, log say:
ERROR: unknown identifier: PlaceStars (MenuCommand in MagicTimes.ocf\Arena.ocf\Astral.ocs\Script.c:0:0)
ERROR: unknown identifier: Done (MenuCommand in MagicTimes.ocf\Arena.ocf\Astral.ocs\Script.c:0:0)


Also, very small question:
Is there any way to make team own a building? Or how to make first player in team become owner of specified building?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill