Search

Search found 111 matches

by Von66341
31 Oct 2011, 18:46
Forum: Lua Scripts
Topic: Unable to get playername??
Replies: 6
Views: 1348

Re: Unable to get playername??

Hey!

Thanks!
I manage to further edit the code.
Thanks for the tip on Spring.GetMyPlayerID!
by Von66341
31 Oct 2011, 18:19
Forum: Lua Scripts
Topic: Unable to get playername??
Replies: 6
Views: 1348

Re: Unable to get playername??

Yup. in a textbox i created in lua. is in gui_pausescreen.lua because the players are writing the message at gamepause, so i merge my textbox with the pausescreen widget. I manage to get it working. my new code: if(input ~= "") then if(playercount ==0) then for i,v in pairs(Spring.GetTeamL...
by Von66341
31 Oct 2011, 17:58
Forum: Lua Scripts
Topic: Unable to get playername??
Replies: 6
Views: 1348

Re: Unable to get playername??

Hey!

Am trying to get the playername.
The player will be typing message on the screen, i want to add the playername to this message, after which sendluamessage to get another widget to write this message to a txt file.

How should I do it right?
by Von66341
31 Oct 2011, 17:33
Forum: Lua Scripts
Topic: Unable to get playername??
Replies: 6
Views: 1348

Unable to get playername??

Hey hey! I have this portion of the code: if(input ~= "") then for i,v in pairs(Spring.GetTeamList()) do if v > 0 then -- a check because for some reason when i = 1, then v = 0 and teamID = nil local teamID = Spring.GetTeamList()[v] for j,k in pairs(Spring.GetTeamUnits(teamID)) do --k is u...
by Von66341
08 Oct 2011, 16:57
Forum: Game Development
Topic: All Unit Position
Replies: 3
Views: 1213

Re: All Unit Position

The link says: File does not exist on our server
by Von66341
08 Oct 2011, 14:32
Forum: Game Development
Topic: All Unit Position
Replies: 3
Views: 1213

All Unit Position

Hey!

Is there a way I can get the position of all units?
Say for example, 5 mins into the game, i want to collect all unit position and log it in a txt file.

Thanks.
by Von66341
04 Aug 2011, 03:01
Forum: Spring: 1944
Topic: Limit number of airstrike called
Replies: 5
Views: 7944

Re: Limit number of airstrike called

Thanks!
by Von66341
02 Aug 2011, 07:43
Forum: Spring: 1944
Topic: Limit number of airstrike called
Replies: 5
Views: 7944

Limit number of airstrike called

Hey!

Anyone knows how I could limit the number of airstrike called?
For example, through out the whole game, only 1 airstrike is allowed

Currently if you click on the starting unit in S44, you have unlimited airstrike.

Thanks!
by Von66341
28 Jul 2011, 15:33
Forum: Game Development
Topic: Modifying CRAIG AI
Replies: 8
Views: 2360

Re: Modifying CRAIG AI

I manage to create the waypoint file (mapname.lua) for the units to work. When I play with other side, my waypoint work perfectly. However, when I play with my side it doesn't work. Hmm...any suggestion why? Link to the codes I have: buildorder.lua > http://pastebin.com/A4B11XnA unitlimit.lua > no c...
by Von66341
27 Jul 2011, 16:47
Forum: Game Development
Topic: Modifying CRAIG AI
Replies: 8
Views: 2360

Re: Modifying CRAIG AI

If I do not want my AI to build anything, i leave it blank?
starting unit is a structure.
by Von66341
27 Jul 2011, 16:06
Forum: Game Development
Topic: Modifying CRAIG AI
Replies: 8
Views: 2360

Re: Modifying CRAIG AI

Thanks FLOZi!

I edited buildorder.lua and the error message disappear.
Link to edited buildorder.lua : http://pastebin.com/B40A8YmN

What does line 235 -241 does?
However using my new side my AI still doesn't send units to attack my base. Any ideas why?

Thanks!
by Von66341
27 Jul 2011, 11:59
Forum: Game Development
Topic: Modifying CRAIG AI
Replies: 8
Views: 2360

Re: Modifying CRAIG AI

I have this error message at the moment: LuaRules::RunCallIn: error = 2, RecvFromSynced, [string "LuaRules/Gadgets/craig/base.lua"]:224: C.R.A.I.G. is not configured properly to play as battalion How do I add a side that is recongise by CRAIG AI? At current my CRAIG AI does not move out fr...
by Von66341
27 Jul 2011, 07:50
Forum: Game Development
Topic: Modifying CRAIG AI
Replies: 8
Views: 2360

Modifying CRAIG AI

Hey! Hey! I am trying to use Spring and Spring 1944 to aid in analysing how different people learn when playing real time strategy games. I have actually have a new side in Spring 1944, and would like to modify CRAIG AI to be able to play using my side. How should I go about doing it? p/s: I not sur...
by Von66341
01 Jul 2011, 13:57
Forum: Game Development
Topic: Time in Seconds?
Replies: 3
Views: 1106

Re: Time in Seconds?

Thanks lots!
by Von66341
29 Jun 2011, 11:44
Forum: Game Development
Topic: Time in Seconds?
Replies: 3
Views: 1106

Time in Seconds?

Hey!

Anyone know how I can the game time in seconds?

Say if it is 10minutes it will display 600 seconds?

I know os.date can give time in Hours:Mins:Seconds, however looking for all in seconds.

Thanks!
by Von66341
23 Jun 2011, 17:03
Forum: Game Development
Topic: End game/Exit Screen
Replies: 2
Views: 1050

Re: End game/Exit Screen

zwzsg thanks for pointing me to the right direction! =)
by Von66341
20 Jun 2011, 09:11
Forum: Game Development
Topic: End game/Exit Screen
Replies: 2
Views: 1050

End game/Exit Screen

Hi! 1. Anyone knows how do I modify the end game/exit screen? 2. Disable the current grey player stats screen that display? 3. At game end, display my own screen? For example, this is what is shown in other games: Zero K - Have this awards screen at the end of the match Gundam - Have this gate that ...
by Von66341
20 Jun 2011, 03:27
Forum: Lua Scripts
Topic: Drawing Images
Replies: 7
Views: 1977

Re: Drawing Images

Hey! I downloaded the widget and tried. It doesn't output any images/heightmap. Anyone know if it is a working copy?
by Von66341
17 Jun 2011, 05:40
Forum: Lua Scripts
Topic: Drawing Images
Replies: 7
Views: 1977

Re: Drawing Images

for format like .jpg or .gif or anyother format

U were saying .bmp, but the writing of files won't be in openGL coding correct?

Or is there a way to open any formation of image file, make new drawning (openGL or other methods) and then save the image file?
by Von66341
17 Jun 2011, 04:46
Forum: Lua Scripts
Topic: Drawing Images
Replies: 7
Views: 1977

Drawing Images

Hello! I understand that lua can open and write to a .txt file With a code something like this: local file = assert (io.open("path","w")) file:write(v) print(v) file:close() I was wondering if it is possible for lua to open an image and make drawing changes to it? If yes, how sho...

Go to advanced search