Search found 111 matches
- 14 Jun 2011, 03:07
- Forum: Game Development
- Topic: CmdID Query
- Replies: 5
- Views: 776
Re: CmdID Query
Thanks Niobium! It works!
- 13 Jun 2011, 04:53
- Forum: Game Development
- Topic: CmdID Query
- Replies: 5
- Views: 776
Re: CmdID Query
I tried out the above 2 suggestion. 1. function widget:UnitCommand(unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams) Spring.Echo ("bla") end This echo is display when my custom commands are run. However, it is command ID 70 instead of my custom command ID. These are the custom comman...
- 10 Jun 2011, 16:44
- Forum: Game Development
- Topic: CmdID Query
- Replies: 5
- Views: 776
CmdID Query
Hi! I have this portion of a code that logs when a command is being execute. function widget:UnitCommand(unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams) local txt local x,y,z = Spring.GetUnitPosition(unitID) if cmdID == 36525 then -- Special On/Off Command txt = "Unit ID "..unitID....
- 10 Jun 2011, 10:29
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Thanks =)
- 08 Jun 2011, 11:40
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Using this we could send information to another player without displaying in the console?
- 08 Jun 2011, 03:53
- Forum: Game Development
- Topic: Attacker Information
- Replies: 5
- Views: 511
Re: Attacker Information
It works like magic! Thanks lot! =)
- 07 Jun 2011, 10:56
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Thanks knorke!
Understand the concept of the communication between widget and gadget.
Say we have lots of messages going in between the widget and gadget.
How do we check the contains of the message to what we want before we do the action? string.gmatch(message, keyword)?
Thanks!
Understand the concept of the communication between widget and gadget.
Say we have lots of messages going in between the widget and gadget.
How do we check the contains of the message to what we want before we do the action? string.gmatch(message, keyword)?
Thanks!
- 07 Jun 2011, 09:53
- Forum: Game Development
- Topic: Attacker Information
- Replies: 5
- Views: 511
Re: Attacker Information
Thanks knorke and zwzsg! Yup, I confirm it only works in gadget! I got this portion of the code in a gadget: function gadget:UnitDamaged(unitID,unitDefID,unitTeam,damage,paralyzer,weaponID,attackerID,attattackerDefID,attackerTeam) local x,y,z=Spring.GetUnitPostion(unitID) local txt = "Unit &quo...
- 06 Jun 2011, 18:23
- Forum: Game Development
- Topic: Attacker Information
- Replies: 5
- Views: 511
Attacker Information
Hey everyone! I have this portion of the code that write who is being attack in the game. function widget:UnitDamaged(unitID, unitDefID, unitTeam, damage, paralyzer) local txt = "TakingFire unitTeam ".. unitTeam.. " unit".. unitDefID.. " id"..unitID write(txt) end Anyon...
- 06 Jun 2011, 17:51
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
yup. in my case I want to send the message player A has to player B computer (infolog and also a txt file that I ask a widget to write that message). but doesn't want the player to be able to see in the console =D
- 06 Jun 2011, 05:29
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Thanks for all the help!
The above is able to send message and the opponent will be able to see.
However, I want to sent a message while the opponent do not see it. In the end, I use "/n" (insert new line) to clear the console before the opponent could see.
The above is able to send message and the opponent will be able to see.
However, I want to sent a message while the opponent do not see it. In the end, I use "/n" (insert new line) to clear the console before the opponent could see.
- 02 Jun 2011, 11:55
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Hmm..i tried Spring.SendCommands("say blabla") and Spring.SendCommands("say a: blabla") but the message is still display in the console/chat. For example, the players type the following: Player A: Alpha Player B: Bravo Can we send the message player B has 'Bravo' to player A side...
- 01 Jun 2011, 14:44
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Re: Sending Console Message
Spring.Echo("message") > this display message on everyone in the game console?
Or it only display on the player console?
For example, I have this message > "test"
But would want test to only show up on the opponent screen when I want to, will it be possible?
Or it only display on the player console?
For example, I have this message > "test"
But would want test to only show up on the opponent screen when I want to, will it be possible?
- 01 Jun 2011, 10:46
- Forum: Game Development
- Topic: Sending Console Message
- Replies: 16
- Views: 4474
Sending Console Message
Hello!
Would like to ask if it is possible to send what I type in to the console to my oponent screen?
But only display when I want it to? Or totally do not display?
Thanks!
Would like to ask if it is possible to send what I type in to the console to my oponent screen?
But only display when I want it to? Or totally do not display?
Thanks!
- 05 May 2011, 06:44
- Forum: Game Development
- Topic: Textbox in game
- Replies: 13
- Views: 2253
Re: Textbox in game
I manage to get a testing text box to work. Code as following: function widget:KeyPress(key,mods,isRepeat,label,unicode) if key == KEYSYMS.BACKSPACE then input = string.sub(input,1,-2) else if key == KEYSYMS.SPACE then input = input .. " " else if key then input = input = input .. label en...
- 05 May 2011, 03:34
- Forum: Game Development
- Topic: Textbox in game
- Replies: 13
- Views: 2253
Re: Textbox in game
I just played zero k.
The line 'Say: ..' is not shifted.
The line 'Say: ..' is not shifted.
- 03 May 2011, 11:51
- Forum: Game Development
- Topic: Textbox in game
- Replies: 13
- Views: 2253
Re: Textbox in game
I did a small testing on this. Basically if I key cltr the spring.echo will be display. include("keysym.h.lua") function widget:KeyPress(key,mods,isRepeat,label,unicode) if key == KEYSYMS.LCTRL then Spring.Echo(" Left Clrt") end end Hence if am thinking of display in a specific b...
- 03 May 2011, 10:49
- Forum: Game Development
- Topic: Textbox in game
- Replies: 13
- Views: 2253
Re: Textbox in game
Doing experimentation in my own game.
I tried the chat method.
I manage to shift the infromation in the chat console to a new moveable menu.
Does anyone know how I could shift the line: '' Say: .." as well?
Thanks.
I tried the chat method.
I manage to shift the infromation in the chat console to a new moveable menu.
Does anyone know how I could shift the line: '' Say: .." as well?
Thanks.
- 28 Apr 2011, 11:10
- Forum: Game Development
- Topic: Textbox in game
- Replies: 13
- Views: 2253
Textbox in game
Hey!
Does anyone know if it is possible to create a textbox function in the game?
Thanks!
Does anyone know if it is possible to create a textbox function in the game?
Thanks!
- 27 Apr 2011, 02:45
- Forum: Map Creation
- Topic: Type Map Display
- Replies: 13
- Views: 1666
Re: Type Map Display
Sound very interesting.
It seem to me the only way is through different textures for the map to give the player an indication of the different terrians.
Thanks for all the help!
It seem to me the only way is through different textures for the map to give the player an indication of the different terrians.
Thanks for all the help!