AliYousuf / hedgewars

Automatically exported from code.google.com/p/hedgewars
GNU General Public License v2.0
0 stars 0 forks source link

request when creating a scheme : new barrel or mine per turn #477

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
i know its possible to add new barrel or new mine at each turn using lua script 
(well don't remember where i saw this but i'm sure its not impossible : maybe 
writing in OnNewTurn.... , i probably saw this in timblr scripts)

anyway, i wonder if its possible to add this option in the scheme making ? 
so people don't have to dowload your script to play it ( your scheme is a 
scheme, not a mod to download)

do you see what i mean  ? 

plus maybe add in this same sheme making options menu : an option that would do 
like highlander, could be called : steal enemy ammo when you kill him)
that would be an highlander option...  

not sure this idea is so bad, sure it won't change the world, but, your open 
suggestion so ... :D 

and maybe its not possible... (cause of gameflag ? ) 

anyway, tell me what you think :) 

Original issue reported on code.google.com by sphrixcl...@gmail.com on 13 Nov 2012 at 5:07

GoogleCodeExporter commented 8 years ago
This would be a super-trivial one-line lua to implement, if you'd like to try 
it out.

Original comment by kyberneticist@gmail.com on 30 Nov 2012 at 4:06

GoogleCodeExporter commented 8 years ago
hum, maybe i could, what is the file to midify ? 

Original comment by sphrixcl...@gmail.com on 30 Nov 2012 at 4:54

GoogleCodeExporter commented 8 years ago
Just make a new lua file.  It'll use onNewTurn, AddGear and FindPlace

Toss the lua file in ~/.hedgewars/Data/Scripts/Multiplayer
Restart, and select it (will be w/ the other scripts like Highlander and such)

https://code.google.com/p/hedgewars/wiki/LuaGuide
https://code.google.com/p/hedgewars/wiki/LuaAPI

Original comment by kyberneticist@gmail.com on 30 Nov 2012 at 7:34

GoogleCodeExporter commented 8 years ago
Oh, and probably simplest way to configure would be multiple scripts w/ name 
identifying, explosive each turn, explosive each two turns (GetRandom), 
explosive each 3 turns...
A bit inefficient, but easy enough to setup if you wanted just to try it out.

Original comment by kyberneticist@gmail.com on 30 Nov 2012 at 8:36

GoogleCodeExporter commented 8 years ago
here is what i done, but don't work very well, it spawn a mine at the begin of 
game, but nothing on new turn

local gear = AddGear(0,0, gtMine, 0, 0, 0, 2)

function onNewturn()

local gear = AddGear(0,0, gtMine, 0, 0, 0, 2)
FindPlace(gear, true, 0, LAND_WIDTH)     

end

Original comment by sphrixcl...@gmail.com on 2 Dec 2012 at 2:04

GoogleCodeExporter commented 8 years ago
't' of onNewTurn() should be capital, and you don't need the first line.
FindPlace might take another parameter these days but you can check the wiki to 
confirm.

relabeling this as a low-priority enhancement rather than a defect. 

Original comment by RedGrin...@gmail.com on 29 Mar 2013 at 5:05