Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[2.2]Programmable AI via scripting
#61
But i think YinYin's way make the code more readable and more beginners friendly.
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by: blow_fly98
#62
Updated!
Version 2.2

The rand() function now works correctly with replays.
Added weapon_num.

Download: http://www.mediafire.com/?pxd026nqoqgw0
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by: A-Man
#63
something's wrong maybe, when i opened the lf2 it also used to open a black window earlier,, but now in the newer versions its not happening, is it not working?
Reply
Thanks given by:
#64
Nope that terminal was removed. It still works though.
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#65
You need to download the Debug version for the console. Why is this so hard to understand.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: Alblaka
#66
coz all the ones here are not computer experts
Reply
Thanks given by:
#67
is it possible to copy the original LF2 AI so that we don't need to work on the whole thing? :P (I mean, e.g. movement, defending projectiles, taking weapons :P )
TEMPE
Reply
Thanks given by:
#68
(07-22-2012, 08:20 AM)Kevin Wrote:  is it possible to copy the original LF2 AI so that we don't need to work on the whole thing? :P (I mean, e.g. movement, defending projectiles, taking weapons :P )

that is the basic AI
with this represented by the void id() function

if you only write the int ego() function the basic AI will remain and call your ego function whenever it deems a special move to be executed

edit: thats a yes and no - you dont have to copy it, but you can still use it
Reply
Thanks given by:
#69
So, just to be clear, it is not possible to "enhance" Rudolf's AI, for example, right? One only has the chance of either modifying Template's AI or write everything from scratch.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#70
(07-22-2012, 08:36 AM)Blue Phoenix Wrote:  So, just to be clear, it is not possible to "enhance" Rudolf's AI, for example, right? One only has the chance of either modifying Template's AI or write everything from scratch.

if i understand it correctly, you can. you just have to script what you have in ego().

i.e.
int ego() {
if ( the target is in a favourable position ) {
.... // do something
.... return 1;
}

return 0;
}
}

it's only if you define the id() function that you overwrite the basic ai entirely.



Azriel~
Reply
Thanks given by: Silverthorn




Users browsing this thread: 4 Guest(s)