Hide the command line, selection box and command menu

Hide the command line, selection box and command menu

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Hide the command line, selection box and command menu

Post by smoth »

I cannot recall the commands and one of you might remember them.

I need to hide the line it draws from a unit to the command location..

as in that dotted line.

I need to remove the little green selection box on the units


I need to hide the buildbar/commandbar whatever you call it.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Hide the command line, selection box and command menu

Post by Google_Frog »

I don't know of a simple way to do those things.

Here is a hacky way to remove unit boxes. I'm not saying this is the only solution but it is a solution. It is used in the 5 unit selection visualisation widgets that are in ZK so it may be the only solution. You could use this method to edit Command Queue Rendering as well such that all commands draw as fully transparent.

In case you aren't aware here is a list of undocumented UI commands. Of course the wiki may be out of date. That should have the command to disable the build menu, maybe it's 'ctrlpanel'?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Hide the command line, selection box and command menu

Post by zwzsg »

smoth wrote:I need to hide the line it draws from a unit to the command location..
In cmdcolors.txt have alwaysDrawQueue 0


smoth wrote:I need to remove the little green selection box on the units

Code: Select all

local function SetupCommandColors(state)
  local alpha = state and 1 or 0
  local f = io.open('cmdcolors.tmp', 'w+')
  if (f) then
    f:write('unitBox  0 1 0 ' .. alpha)
    f:close()
    spSendCommands({'cmdcolors cmdcolors.tmp'})
  end
  os.remove('cmdcolors.tmp')
end
It seem a bit ugly but it's how Trepan did it so I suppose it's ok.


I need to hide the buildbar/commandbar whatever you call it.
Spring.SendCommands({"ctrlpanel LuaUI/Widgets/YourOwnCtrlPanel.txt"})-- With xPos or yPos out of screen there



:? None of my three answers are pretty so now Smoth will raeg all over the place about how angry it makes him to have his topics desacrated by unwanted solutions.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Hide the command line, selection box and command menu

Post by SinbadEV »

I don't know what I'm talking about but commenting in a "maybe I'll inspire someone who does to think of a solution" capacity:

If the functions to draw those things are Lua couldn't you just make your own versions of those functions that didn't draw them, overriding the default behaviour?

If not, consider this a request to investigate moving said features from engine core to Lua.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Hide the command line, selection box and command menu

Post by KDR_11k »

You could do it the crazy route and disable selections, merely passing the few commands you want to let the player use through a gadget. I think that's how Air Raid avoids all these issues.
Post Reply

Return to “Game Development”