Gw Temp

Menu

Tutorial - 'ABS enemy magic system' by Guest

An item about RPGMaker 2000 posted on

Blurb

Creating a magic system that your enemies can use in an ABS? Well, then this is your tutorial.

Body

First off, I did this in RPG maker XP but I know you can do this for RPG maker 2000 and 2003. Second of all, this is my first tutorial, and third and last of all, most of you might already know how to do this but I just wanted to point this out. Of course, maybe nobody's ever thought about it, but probably a lot of people know how to do this.

What this does is, in an ABS, you can usually use some form of magic, right? But the enemies should know some magic too, and this tutorial will explain how to do that, and its quite simple, but you might have to make the events on every map, I'm not sure yet.

Ok, create an event, make it parallel process, and enter this in.

<>Variable: [XXXX: magicwait] =, Random ( 0..9 )

In otherwords, go to the variable editing thing and make a variable (I called it magicwait) set to a random number between 0 and 9.

<>Conditional Branch: Variable [XXXX: magicwait] <=3
<>Local Switch: A = ON
<>
: Else Handler
<>Wait: 120 frames
<>
: End
<>
This makes it so that if the variable magicwait is less than 3, it turns a switch on. In RMXP, I do a local switch, but if your using RM2K or RM2K3 then just do a switch. Then if magicwait is above 3, then it waits a number of frames in RMXP or something like 15 seconds otherwise.

Now make a new page with presetting that the switch you made earlier is on, and make it parallel process. Enter this code.

<>Message: Enemy magic!
(I would replace this with a picture)
<>Show battle animation [M]: [monsterthing], [Magic Casting]
(This shows a magic casting animation on the monster casting the magic.)
<>Variable: [XXXX: X co] = Player X Coordinate
<>Variable: [XXXX: Y co] = Player Y Coordinate
(This sets the variables to the player's exact location.)
<>Variable: [XXXX: magicchance] = Random ( 0..3)
(THis sets the variable magicchance to a random number between 0 and 3, to see if the magic hits or misses.)
<>Conditional Branch: Variable [XXXX: magicchance] == 1
(This makes it so that if the variable equals 1, something happens.)
<>Show battle animation [M]: Player, [Lightning 2]
(This shows the battle animation on the player if he gets hit)
<>Change HP: Entire Party, - 3
<>Message: -Arshes- OUCH OH MY GOSH I GOT HIT BY LIGHTNING!!!!!
<>Local Switch: A = OFF
<>
(This damages the player, and then turn your switch off.)
: Else Handler
<>Variable: [XXXX: y change] = Random ( 0..2 )
<>Variable: [XXXX: x change] = Random ( 0..2 )
<>Conditional Branch: Variable [XXXX: y change] ==1
<>Variable [XXXX: y co] += Random ( 1..5 )
<>
: Else handler
<>Variable [XXXX: y co] -= Random ( 1..5 )
<>
: End

Right now I'm sorry if this is boring.

So do the above conditional branch with the X coordinate,changing the X or Y coordinate recorded of the hero. Now FREEZE! Click ok and go back to your map. Somewhere, anywhere, add an event, and don't do anything but name it something like "magicsquare", which is what I named it. After you added that, go back to the event we were editing and add this to finish it.

<>Change Event Location: [magicsquare], By variables [XXXX][XXXX}
(Those two variables should be the changed X coordinate and Y coordinate)
<>Show battle animation [M]: [magicsquare], [Lightning 2]
<>Local Switch: A = OFF
<>
: End
<>

That ends the programming. The local switch above, once again, should be changed to your switch you made before if your using RM2K or RM2K3.

I hope this helped you and your game or your ABS!