Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there any easy ddraw tutorial to script AI?
#31
No, I just want to know what code should i type to make my char run.
Life is like a bicycle; to keep your balance, you must keep moving.
Reply
Thanks given by:
#32
You should invoke Run(), but at first you should create a body of this function.
Reply
Thanks given by:
#33
(08-17-2012, 12:44 PM)professional DCer Wrote:  No, I just want to know what code should i type to make my char run.

Think about it, when you are playing lf2 what buttons do you press to run? The AI has to push the same buttons.
[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:
#34
What is the use of load target function and how to use it?
Life is like a bicycle; to keep your balance, you must keep moving.
Reply
Thanks given by:
#35
It targets an opponent on the field. There can be a maximum of 399 objects on the fields. And ,AFAIK, the nearest objects gets the 0. The second nearest gets the object number 1...etc(up to 399(the most far object)) . Please correct me if i am wrong people. I am not sure and i don't wanna guide people wrongly.
[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:
#36
can you please write a small script to show me how it works?
Life is like a bicycle; to keep your balance, you must keep moving.
Reply
Thanks given by:
#37
(08-20-2012, 03:22 AM)A-MAN Wrote:  It targets an opponent on the field. There can be a maximum of 399 objects on the fields. And ,AFAIK, the nearest objects gets the 0. The second nearest gets the object number 1...etc(up to 399(the most far object)) . Please correct me if i am wrong people. I am not sure and i don't wanna guide people wrongly.

nope - objects are not sorted like that
let me quote myself
(06-11-2012, 01:42 PM)YinYin Wrote:  
FUNCTIONS (Click to View)

(08-20-2012, 05:00 AM)professional DCer Wrote:  can you please write a small script to show me how it works?

my tutorial includes two very small loadTarget examples
let me quote myself
(06-11-2012, 01:42 PM)YinYin Wrote:  
TARGET LOADING (Click to View)

if these two are still too difficult even tho you just need to copy them try this:

clr();
print(loadTarget(#enter your player number - 1 here#));

if you have selected a player character on the object slot you entered in the loadTarget the console will show a 0 (because characters are type 0)
if you have not and that slot is empty it will show a -1.


for further reading and experimenting on how objects are distributed over the 400 slots you may read this thread:
http://www.lf-empire.de/forum/thread-7976.html
Reply
Thanks given by: professional DCer
#38
How to make my char know that there is a bounceable and dangerous object in range coming near him and then make my char punch it to bounce it back?
(Bounceable object like davis energy ball or freeze ice ball)
Life is like a bicycle; to keep your balance, you must keep moving.
Reply
Thanks given by:
#39
follow my writing basic AI thread - i will eventually come to that
Reply
Thanks given by: professional DCer




Users browsing this thread: 1 Guest(s)