A glowing magic sword that follows the player, attacking anyone else
Particularly effective in third-person/Isometric views.

If you've ever played Dungeons and Dragons or Baldur's Gate, 
then you'll recognize this as Mordenkainen's Sword.  
Uh,Oh! Can I Say Mordenkainen without breaking
some trademark law?  Too late I guess.

This is my first and likely last contribution since my demo is about to expire.
I hope someone finds this useful, it's been a lot of fun writing it.

//\\// >> NEWBIE WARNING!  I am a total amateur at cScript so this code, although << //\\//
//\\// >> functional, may contain some real stupidity! Use at your own risk!      << //\\//

For simplicity's sake, I've included the particle effect functions in this file.
In actual production that code should probably be moved to an effects.wdl or whatever.

If you're a beginner, like me, then you could probably use a hand getting this to work:
Copy this file, the three .tga files and the mdl file into your working directory.
Open your main WDL file, ie. Office.wdl and add the following line near the top
next to the other include lines: 
   include <FlyingSword.wdl>; This will include this file into your game
Now you just need a way to "summon/cast/etc.." the sword.  I added the line:
    ON_M CallMagicSword; //Magic sword is cast when user presses the 'M' key
at the bottom of my input.wdl but you could put it just about anywhere that
makes sense to you.  If you're still using Office.wdl as your base template, I
Strongly recommend you press [F7] to toggle to third-person mode for the full 
effect of the sword.  You're welcome to email me for help, just keep in mind 
I have no idea what I'm doing  8-)

What good is a magic flying sword if there's nothing to attack?  The sword will
only attack entities with a flag1 == on, and skill9>0.  As it attacks it decrements
the target's skill9(health).  If you're using office.wdl be sure to set the guard's
flag1 and skill9 accordingly and don't expect him to drop dead since his behavior, 
"Patrol_prog" doesn't handle that.  If you want to see him die switch his behavior
to "actor_walk_fight."

Also, if you're new and you haven't read the tutorials by RealSpawn, GnomeTech,  
Gabor Denes, AcidCrew, Doug's Adventure Workshop and all the others on Conitec's
downloads page http://www.conitec.net/a4update.htm, do so now. My sword MDL is 
actually Skillator's sword with a new paintjob.  Thanks for your help guys, 
I would've been totally lost without your work as a reference.

BTW, although you can fire off multiple swords, they will all go after one target.
I'm sure there must be a way to give each sword an entity pointer to it's own target,
but I couldn't figure it out.  Anyone have a suggestion? Anyone? Anyone?

This code is free for anyone for any purpose - however, I am not responsible.  
No, really, I'm not responsible.  Ask anyone.

Seriously, if you have any comments or suggestions please let me know at 
jbeucus@bionicware.com. And if you do find it useful, the opportunity to play 
your game would be a nice reward.  Regardless, enjoy...

- John {5/7/02}
