Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Most problems solved! Here is the video about my product :)
#11
Are you talking about NTSD and the move being the recharge move? Nave modified the basic AI to do that(so all characters do it), if it's doing the charging move then special move AI shouldn't run.

I could be wrong, but I'm pretty sure this is the case.
[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: totokwok
#12
okay.. but it's not the original NTSD since it uses LF2 1.9c and it can not run with AI scripts. The one I'm working on is the 'Final Edition' (not official) by someone else which uses LF2 2.0 and does not have basic AI, but I think this mod is quite interesting so I had an idea to run AI scripts on it for fun. (built-in AI in NTSD 2.4 isn't really good anyway except id 21)




Question 2: How to ensure the AI use specific move only when there is one opponent?

Code:
for (int i = 0; i < 8; ++i){
    if ( target.team != self.team && target.num != self.num  && target.hp > 0){
         k = k + 1;
    }}
    if (k == 1){
    DdJ();
    }

does it work on ego function?




EDIT: solved.. it should be
Code:
int k = 0;
    for (int i = 0; i < 400; ++i){
    if ( loadTarget(i) == 0 &&target.team != self.team && target.num != self.num  && target.hp > 0){
         k = k + 1;
    }}

... ...





Question 3: Sometimes the AI won't alter his facing before doing some moves like DvA , D^J etc (He faces left when target is on his right)

Code:
if ( abs(self.x-target.x) >= 171 && abs(self.x-target.x) <= 390 && abs(self.z-target.z) <= 10 ) {
if (target.x > self.x){
    right(1,0);
    DdA();
} else {
    left(1,0);
    DdA();
}}





Question 4: Anything wrong with the script below? Many 'good's were printed but he only punched without triggering a move ( A D )
Code:
if (abs(self.x-target.x) >= 91 && abs(self.x-target.x) <= 370) {
A();

if ((self.x-target.x >= 91) && ((self.x-target.x) <= 370)  && (self.frame >= 60) && (self.frame <= 67) ) {
if (target.x > self.x) {
    D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); print("good");
   } else {
    D(); D(); D();  D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); D(); print("good");
   }}
Reply
Thanks given by:
#13
Question 3:

You need to turn left/right first, then do the move.

Question 4: First of all why do you have so many D();'s ?! I don't really know why it's not working, check all your inputs before and after.
[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: totokwok
#14
(08-14-2012, 01:09 PM)Lord Silva Wrote:  Question 3:

You need to turn left/right first, then do the move.

Question 4: First of all why do you have so many D();'s ?! I don't really know why it's not working, check all your inputs before and after.

about Question 3: i think i understand.. trying.. sorry, any simple example? :(


about Question 4: just a test, but he never Defend...
Reply
Thanks given by:
#15
3: Check if you are facing the proper way. If you are not, press left/right. If you are facing the right way then it'll do the move. This way it is done over 2 frames and not one.

4: Are you sure there is a hit_d in those frames?
[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: totokwok
#16
(08-14-2012, 02:50 PM)Lord Silva Wrote:  3: Check if you are facing the proper way. If you are not, press left/right. If you are facing the right way then it'll do the move. This way it is done over 2 frames and not one.

4: Are you sure there is a hit_d in those frames?

4: sure, at least when I use that character, I can press A then press D when he's punching and do the move. also, most AI can do 'A J' moves randomly as I know

3: ok.. I will try it
Reply
Thanks given by:
#17
Thing is that, once the script is run, it executes within a single frame (something which you probably can't do). You'd have to check if you're in the correct frame (self.frame == 60 || self.frame == 65, etc., assuming we're talking about the regular punch).
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

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

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: totokwok
#18
(08-14-2012, 03:05 PM)Blue Phoenix Wrote:  Thing is that, once the script is run, it executes within a single frame (something which you probably can't do). You'd have to check if you're in the correct frame (self.frame == 60 || self.frame == 65, etc., assuming we're talking about the regular punch).

got it! thanks!!


for 3:
I still can't make it ... :s
Code:
if ( abs(self.x-target.x) >= 151 && abs(self.x-target.x) <= 390&& abs(self.z-target.z) <= 4 &&  target.x > self.x ) {
if ( self.facing){
    DdA();
} else {
if ( target.x > self.x && !self.facing){
    right(1,0);
}}}

if ( abs(self.x-target.x) >= 151 && abs(self.x-target.x) <= 390&& abs(self.z-target.z) <= 4 && target.x < self.x ) {
if ( !self.facing){
    DdA();
} else {
if ( target.x < self.x && self.facing){
    left(1,0);
}}}

When he meet the condition and face the opponent, he does nothing except jumping.. and sometimes do the move when he's not facing the opponent... confused

aww I think I messed with self.facing and !self.facing ... I replaced self.facing with !self.facing and vice versa, seems that it works
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)