Search found 195 matches
- 14 Feb 2022, 16:44
- Forum: Lua Scripts
- Topic: help with customPlayerKeys
- Replies: 4
- Views: 5847
Re: help with customPlayerKeys
yes... I tried, like [player1] { countrycode=Italy; [...] team=0; avatar = xx; ---<<< custom parameters othervariable = yy; ---<<< custom parameters } but nothing... also I tried using: [player1] { countrycode=Italy; [..] team0 } [customPlayerKeys1] ---<<< custom parameters player 1 { avatar=aa; } b...
- 05 Feb 2022, 23:54
- Forum: Lua Scripts
- Topic: help with customPlayerKeys
- Replies: 4
- Views: 5847
Re: help with customPlayerKeys
Yes! Though I mostly use customTeamKeys, and I don't remember well but maybe there was an issue with customPlayerKeys not being transmitted. I can't receive data from customPlayerKeys wrote into the "script.txt", and I think that my code is wrong, could you please check it?: [...] [player...
- 04 Feb 2022, 10:05
- Forum: Lua Scripts
- Topic: help with customPlayerKeys
- Replies: 4
- Views: 5847
help with customPlayerKeys
Hello, please can you help me about customPlayerKeys ? I see in wiki: Spring.GetPlayerInfo ( number playerID ) return: nil | string "name", bool active, bool spectator, number teamID, number allyTeamID, number pingTime, number cpuUsage, string "country", number rank, table custom...
- 19 Dec 2020, 13:21
- Forum: Lua Scripts
- Topic: Global variable
- Replies: 2
- Views: 3835
Re: Global variable
Hi Ivand.. the link was helpful!!! Thank you!!!
- 18 Dec 2020, 20:57
- Forum: Lua Scripts
- Topic: Global variable
- Replies: 2
- Views: 3835
Global variable
Hello, Please can you help me with a global variable? : I need to send a variable from gadget to widget but some error appear during tests: code in gadget: ---- --sync ---- function gadget:GameFrame(n) [...] SendToUnsynced("start",1,0) end [...] ---- --unsync ---- function gadget:Initializ...
- 29 Oct 2019, 20:18
- Forum: Lua Scripts
- Topic: help about a gate
- Replies: 12
- Views: 10228
- 28 Oct 2019, 21:04
- Forum: Lua Scripts
- Topic: help about a gate
- Replies: 12
- Views: 10228
Re: help about a gate
If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20 No. Top to bottom left to right punctuated by spaces. "oo oo cc cc cc cc cc cc oo oo", is: 2 block, 2 block, 2 open, 2 open, 2 open, 2 open, 2 open, 2 open, 2 block, 2 block and yardmap of gate is correct: footprin...
- 23 Oct 2019, 21:56
- Forum: Lua Scripts
- Topic: help about a gate
- Replies: 12
- Views: 10228
Re: help about a gate
in .cob script you mean?
i have this code:
i have this code:
Code: Select all
OpenYard()
{
set YARD_OPEN to 1;
while( !get YARD_OPEN )
{
sleep 1500;
set YARD_OPEN to 1;
}
}
CloseYard()
{
set YARD_OPEN to 0;
while( get YARD_OPEN )
{
sleep 1500;
set YARD_OPEN to 0;
}
}
- 23 Oct 2019, 18:46
- Forum: Lua Scripts
- Topic: help about a gate
- Replies: 12
- Views: 10228
help about a gate
hello all,
i have a small problem about this gate : in unitdef yard map="oo oo cc cc cc cc cc cc oo oo" so you can see in the picture tha passing is open but units can't pass trought the gate.
Where i wrong?
i have a small problem about this gate : in unitdef yard map="oo oo cc cc cc cc cc cc oo oo" so you can see in the picture tha passing is open but units can't pass trought the gate.
Where i wrong?
- 24 Jan 2019, 19:14
- Forum: Lua Scripts
- Topic: team won condition
- Replies: 5
- Views: 7116
Re: team won condition
so i need simple gadget that write the winner player name, at end of game, in infolog.txt
for example;
"daryl won the battle"
"sprunk won the battle"
etc.
for example;
"daryl won the battle"
"sprunk won the battle"
etc.
- 23 Jan 2019, 10:50
- Forum: Lua Scripts
- Topic: team won condition
- Replies: 5
- Views: 7116
Re: team won condition
I want a list of winning players only...i try as soon as possibile.
thx
thx
- 03 Jan 2019, 16:14
- Forum: Lua Scripts
- Topic: team won condition
- Replies: 5
- Views: 7116
team won condition
Hello all , I need help about a widget: I want to write a file with a list of winner teams. At the moment I do a list of loser teams (it's more easy): function widget:TeamDied(TeamID) local GetPlayerInfo = Spring.GetPlayerInfo local Echo = Spring.Echo file = io.open ("rpt.wrm","a"...
- 25 Feb 2018, 11:26
- Forum: Lua Scripts
- Topic: Zero-K Mission editor
- Replies: 1
- Views: 2823
Zero-K Mission editor
hello, Can I get, via lua, the group name of a unit created via Zero-K mission editor? i would like implement my code com=Spring.CreateUnit("icucom",6900,0,11400,0,1) atlas= "get the group name setted in Zero-K mission editor" Spring.GiveOrderToUnit(atlas, CMD.LOAD_UNITS, { com }...
- 20 Dec 2017, 19:33
- Forum: Map Creation
- Topic: info about "Space map"
- Replies: 9
- Views: 9558
Re: info about "Space map"
This is merely something that i put together to check the possibilities of 3d models as terrain: https://youtu.be/OdQ2tVs3aTo Uses a gadget to spawn the units, and LUS to to alter terrain height according to the unit model. Also features a modified version of the "void" gadget found in Vi...
- 21 Nov 2017, 01:07
- Forum: Map Creation
- Topic: info about "Space map"
- Replies: 9
- Views: 9558
info about "Space map"
hello all, I would like make a "space map" like "AstroTurf" and i did some test: http://www.warmachinesrts.com/altri_siti/question.png So I used voidWater = true, into mapinfo.lua it's ok but I see: 1) blast on invisible water surface: it's possible to shut off water? i would lik...
- 31 Oct 2017, 15:34
- Forum: Lua Scripts
- Topic: Unit in area -> destroy units
- Replies: 10
- Views: 4239
Re: Unit in area -> destroy units
hi gajop, I know ZK mission editor and work well with my game (a BA variant). But the question is: can I publish missions for my game made with ZK Mission Editor in my website? is ZK mission editor open source? also is Zero K Mission Editor protected by copiright or other and I can publish only mis...
- 31 Oct 2017, 13:39
- Forum: Lua Scripts
- Topic: Unit in area -> destroy units
- Replies: 10
- Views: 4239
Re: Unit in area -> destroy units
Why not use SpringBoard or ZK's Mission editor for this? Both are primarily designed for non coders. I demonstrate something similar to what you're trying to achieve in this video: https://www.youtube.com/watch?v=DBigX19uiYA hi gajop, I know ZK mission editor and work well with my game (a BA varian...
- 31 Oct 2017, 09:16
- Forum: Lua Scripts
- Topic: Unit in area -> destroy units
- Replies: 10
- Views: 4239
Re: Unit in area -> destroy units
Overall, you cannot throw words in a file and expect it to work. Programming is very strict, a single mistyped character and nothing works. The computer won't guess what you want from vague indications. You must give precise instructions. Hi zwzsg, I know that... but I don't know LUA, I wrote here ...
- 29 Oct 2017, 21:35
- Forum: Lua Scripts
- Topic: Unit in area -> destroy units
- Replies: 10
- Views: 4239
Re: Unit in area -> destroy units
Spring.GetUnitsInRectangle(0,0,0,0,0) is a rectangle from 0,0 to 0,0 -> it's a degenerate rectangle, all corners are the same point! Use an actual rectangle, one with a not null area, if you hope to catch units. Spring.GetUnitsInRectangle is a function that returns the units that are in the rectang...
- 29 Oct 2017, 09:27
- Forum: Lua Scripts
- Topic: Unit in area -> destroy units
- Replies: 10
- Views: 4239
Unit in area -> destroy units
Hello, please can you help me with code? I'm trying to learning LUA. I would like to do this: - When an unit of Team 0 is in the rectangle, "U" unit will be destroy I wrote this code: function gadget:GetInfo() return { name = "test minimission", desc = "Minimission", au...