Local Variables for the AI

User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Local Variables for the AI

Postby Kyran » Mon Dec 17, 2012 10:36 am

This is my old AI from 2010. I want to make it release worthy. I need to make jadeite_stepping local to the AI. I'm thinking about turning it into an array jadeite_stepping[AiPlayer], would there be a better way?
Attachments
ai_jadeite.lua
(11.93 KiB) Downloaded 169 times
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
jarod42
Posts: 101
Joined: Fri Jan 20, 2012 7:43 pm

Re: Local Variables for the AI

Postby jarod42 » Tue Dec 18, 2012 2:46 am

Using Array with AIPlayer is the way used in wargus,
and it seems a good way to handle AI variables in script.

Note that lua function "CleanGame_Lua()" is called when a game ends and those variables should be cleaned in that function.

Note also that local variables are not saved.

I read your script:
Don't use Math.random since you may have desync in MultiPlayer.
Use SyncRand instead.
faarizamar
Posts: 1
Joined: Fri Jan 16, 2015 5:13 pm

Re: Local Variables for the AI

Postby faarizamar » Fri Jan 16, 2015 5:17 pm

I am looking for a game engine that can run as a turn based game. Stratagus caught my attention, and before investing a lot of time, blood, sweat, and tears I wanted to ask if this engine is able to do turn based strategy or not.
Our excellent online a+ certification training programs sy0-401 will lead you network+ study guide pdf to success in the We also offer latest and Rasmussen College with 100% success guarantee. Our Sterling College is rare in IT world.
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Local Variables for the AI

Postby b_o » Sat Jan 17, 2015 2:23 am

Wyrmsun grand strategy mode has turn based management, with RTS battles. If you want a game like that grand strategy mode without the RTS battles, that should work with a little work.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Local Variables for the AI

Postby Kyran » Tue Jan 20, 2015 7:57 am

Probably would be better if you try Battle for Wesnoth or FreeCiv first.
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm

Re: Local Variables for the AI

Postby cybermind » Wed Jan 21, 2015 3:38 pm

So much talking with a bot :)

Who is online

Users browsing this forum: No registered users and 1 guest