Scripts like that are not allowed to be used, since they can give players advantage over other players. You can write a custom AI (http://littlewargame.com/blog/the-littlewargame-ai-api/), which is very encouraged, or use the editor (which will feature some sort of scripting at some point) to create maps / mods with additional features that you like.
http://littlewargame.com/blog/the-littlewargame-ai-api/
You can load new AIs from the options menu.
When you start a game vs CPU, you have the option to load a new AI by clicking on "Computer."
This is all done through the user interface, but I suppose you could write a browers script to do this automatically.
This is a build in function of the way chrome handles full screen programs.
You might find a solution using kiosk mode
I tend to use hotkeys/controlgroups/camerakeys so it's not a problem personally
Jbs is aware. He's working on finding and solving the problem. There's a thread in the Bug Report forum about it.
I'll continue updating the map once the desynch is solved.
Thank you for bringing this us to our attention. You can read about our decision in this case HERE:
Feel free to comment on either the forum post or the subreddit and I will respond as quickly as is practicable given my availability.
The game rarely loads. It usually gets stuck on the very last bar, as shown in the picture.
Console errors: Failed to load resource: the server responded with a status of 403 (Forbidden)
Uncaught ReferenceError: Network is not defined
Uncaught TypeError: Cannot read property 'onKey' of undefined
GET http://littlewargame.com/play/extern/underscore-min.map 404 (Not Found)
you mean writing an AI in general ? then this is what youre looking for.
or do you mean how to have 2 AIs battle against each other ? This is easy, just load both of them, then open a game, add 2 cpu players, set one AI for one of them and the other AI for the other one, put yourself in the spectator slot and go.
(1) You must be right about the error. How did you come to this conclusion? From the a d[e] undefined error I could not come up with anything tbh.
(2) good to know, thanks
(3) this explains some of my issues, I will check the rest in the editor
(4) ok, I get it now how to find it in http://littlewargame.com/play/lwg-worker.min-v.js
I looked at the your post more thoroughly, and here are the answers:
2, 3. If an information is unavailable through the functions and properties of the scope object, you can use the 'game' object. It's a global variable. It has every information you will need for your AI, even the position of the enemy units, etc.
I was unable to reproduce the problem. If the problem persists, could you send me the error message?
for(x in array) is python, not javascript. You have to use for(x = 0; x < A.length; x++).
I wish you luck in making a good AI for LWG! There are many AIs you could take a look at, which is compiled here: https://www.reddit.com/r/Littlewargame/comments/6s36x4/does_anyone_have_any_harder_ai_than_the_normal/
Don't forget everything has to be on a single picture, in order, and not a video, in the same way you can see on the picture.
So in the end you'll have to sort every single frame together to create a picture similar or identical to the one I provided.
If you want to create a sprite that only uses 4 sides: http://littlewargame.com/play/imgs/units/wolf.png
And for buildings: https://i.imgur.com/sxlc0e3.png
http://littlewargame.com/play/imgs/buildingSheet_new.png
Do not use this for anything except for creating mods in lwg, the copyright only gives you the right to do that. You do not have permission to use it for other projects, buiness use ect ect
Also in his blog post a while back found here http://littlewargame.com/blog/littlewargame-the-reddit-army-has-arrived/
He talks about wolves and dropships being the newest units he will be bringing to us.
This should totally be added as a single-player mode if they can polish it! Like the alternative Dungeon Sprint and Zot Defense modes on Dungeon Crawl Stone Soup. It would be nice for training!
Unless this sort of thing involves security or cheating risks, of course.