Does anyone still has the "Cheater Widget" which displays two or three GUI buttons to activate cheat/nocost? I think it got lost when unknown files got lost...
Wanted: Cheater Widget!
Moderator: Moderators
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Wanted: Cheater Widget!
No, not what you think
Does anyone still has the "Cheater Widget" which displays two or three GUI buttons to activate cheat/nocost? I think it got lost when unknown files got lost...
Does anyone still has the "Cheater Widget" which displays two or three GUI buttons to activate cheat/nocost? I think it got lost when unknown files got lost...
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Wanted: Cheater Widget!
For devving purposes, I find the fastest possible method is just having hotkeys in uikeys set up.
-
Google_Frog
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Wanted: Cheater Widget!
Or you could just use this:
Code: Select all
function widget:GetInfo()
return {
name = "Cheat",
desc = "Cheats",
author = "Google Frog",
date = "Dec 30, 2008",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true -- loaded by default?
}
end
function widget:GameOver()
local frame = Spring.GetGameFrame()
local plist = Spring.GetPlayerList()
if (#plist == 1) and (frame < 100) then
Spring.SendCommands{"cheat"}
Spring.SendCommands{"spectator"}
Spring.SendCommands{"godmode"}
end
widgetHandler:RemoveWidget()
end
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Wanted: Cheater Widget!
Thanks to you, both sounds reasonable. I still have a slight emotional binding to the original cheater widget since it has such a nice GUI and I learned lots from it while making my own GUI buttons 
@google:
Shouldnt the "GameOver" callin be replaced by something like "GameStart"?
@google:
Shouldnt the "GameOver" callin be replaced by something like "GameStart"?
-
Google_Frog
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Wanted: Cheater Widget!
The reason for game over is so that it doesn't autocheat when playing missions as bots don't count as players.very_bad_soldier wrote:@google:
Shouldnt the "GameOver" callin be replaced by something like "GameStart"?
