Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Mixing Dark AI and "Old" AI to make a cowardly enemy?

Author
Message
kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 1st Oct 2010 01:21
Hi guys,

So, I hope it's alright that I'm creating another thread to ask this, but I'm not sure how active that Dark AI Knowledge thread is, since there seem to have only been questions since August. I've been trying to read as many threads as I could about Dark AI because, to be honest, and as silly as it might sound, I'm still a bit confused about what it "is" or what I can do with it. Basically, I'm not sure if I should just keep messing around with things until it works (after all, I am new to this), or if what I'm trying to do isn't even possible with Dark AI.

For example, I'm still unclear about the interaction between Dark AI and the "Old" AI systems and what one can do with it. I'm currently trying to make a character on the enemy team, essentially, behave like the old "coward.fpi" script. I don't even want him to attack you or anything... no melee or ranged. I just wanted the player and the allies to have to chase him around until he's dead.

Initially, I just tried to add him to the enemy party via the appear script and then make the main script the old coward.fpi, but I've found this is too glitchy. The core behavior is fine in that he will run and duck, but something gets messed up in the collisions, and my coward started running through walls until he vanished from the map. Odd.

Next, I tried using only Dark AI, but the problem is that, from what I understand, you can't dictate animations in Dark AI. I was able to make it so that he never walked, only run, but I can't really dictate for him to "duck", since I've heard that's based on how much life he has left? I then tried to code him to always seek cover, but I'm not sure what's going wrong because he usually just stands there. (This one could just been an error of mine, I suppose, since I definitely don't see why that can't be possible.)

That's why I then tried to use the method they employed in reloading weapons where I turned off the Dark AI, tried to dictate animations like those in the coward.fpi and then turned Dark AI back on. This was the biggest fail in that it just made the character go stiff and slide across the ground forward, through the wall and into oblivion.

Now, again, this could all just be error on my end, but until I'm clear on what Dark AI is meant to do, I'm not sure if I should just keep trying or if I'm trying to put a square peg in a round hole. I'd really appreciate any insight and for someone to just cut me off and say, "That's impossible," or "You're approaching this all wrong" from the (semi)-start. Thanks.
kms
15
Years of Service
User Offline
Joined: 9th Jan 2009
Location:
Posted: 2nd Oct 2010 03:09 Edited at: 3rd Oct 2010 02:30
EDITED: I'm still having crash problems, but it's not as consistent, so I changed the post to reflect such.

Sorry to double post; I made some progress on my own by using setvar= and incvar= instead of animate=, but now I have a new problem that's not exactly replacing my initial one. (I still would like to understand Dark AI better.)

What I've found is that it seems it is possible to mix Dark AI and Old AI to an extent, but it's not working in the way I intend it to. I've gotten the character to run away from me in the way that the coward does, and he no longer teleports through walls, but it's not exactly what I mean to have happen when I script. It's sufficient, but as it might be seen in my script below, I'd wanted the enemy to also incorporate things like the crouching idle motion, and it never seems to do that. (He does crouch strafe, though, so it's not a big deal.) (WARNING: He can still get stuck if you hold him in corner too long, but I think I've run into that problem with other pre-written FPSC scripts, too... so I don't know if it's the system or me.)

The bigger problem, though, (the one that I thought warranted a second, separate post, but if a mod disagrees, please let me know) is that the game crashes seemingly-randomly at times when the coward is taking damage (whether it be from an ally or myself). However, it does always seem to be moving or running in some way. I'm guessing this is an error in my script, so if someone could figure out why this is happening, I'd definitely appreciate it. The error I always get is something like this:

"Runtime Error 118 - Array does not exist or array subscript out of bounds at line 28380"

I have no idea what that means, but it may help someone else? Thanks in advance!

Login to post a reply

Server time is: 2024-11-24 19:23:38
Your offset time is: 2024-11-24 19:23:38