Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Scripting Enemies?


rhyel
 Share

Recommended Posts

What I would like some help with is to know if there is any code to make enemies do the following:

- Make enemies shoot instead of rush up to attack in melee combat.
- Make enemies cast single and multiple target spells. (or AOE spells)
- Make enemies move strategically.
(Such as moving around the room and striking from time to time so they don't get hit as much. (for bosses only))
- Make ranged enemies keep their distance. (Shoot and run)

If there's any way to code these I'd be extremely grateful to anyone who can assist me in what to write and where to place it.
Link to comment
Share on other sites

Lol, I'm just doing this as a solo project on my own to get better with scripting, but I'm content on completing it. If anyone else would know about this I'd still love some assistance but I guess I'll just take a look around until then. Thanks ;]
Link to comment
Share on other sites

Call FireArrow(index, Arrow, Dir)

Sinc you are trying to learn and get better at scripting, I'll just post some commands, that I use. For the rest I would tell you to make some subs and stuff about like. Were the scripted npc checks to see if the person it attack has moved closer to him, then if so have the npc run away, fire, runaway. Or have it so he run's away till he is x amount of space's away then fire's again. Or if the person is attacking him, have it check to see that and if so have the npc attack him with a diffrent attack. (Really not that hard, just alot of checks)
Link to comment
Share on other sites

That script was somewhat useful to me, and I'll probably refer back to it in the future but it hasn't really shown me anything about how to script NPC characters.

What I would like is maybe a simple example of how to script an enemy.

Thanks for the help though Southern, much appreciated.

My main issue sadly is I'm not familiar with all the commands for sadscript, like Get and Call commands are still fuzzy to me on how to work them properly. If anyone can refer a well detailed tutorial for me that would be great. I've checked Godlord's tuts but they don't explain things very well, though they are handy for brief descriptions of what does what.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...