Gw Temp

Menu

Tutorial - 'FPS System Part 2: Attacking Enemies and Shields' by Dimensionwyrm

An item about RPGMaker 2000 posted on

Blurb

Lunchman introduces the secret to adding attacking enemies and a Halo-like shield system to the first FPS System tutorial!

Body

--FPS SYSTEM PART II: ENEMIES AND SHIELDING—



You may have read the first FPS system tutorial. Now, with this tutorial, you can also learn how to add enemies that attack into this and adding the ability to raise a shield, and also include a Halo-style other shield. To learn how simply continue reading. Before doing so, make sure you’re experienced enough to do this. I won’t explain how to do everything, only things that would have to be explained to someone who has been using rm2k/3 for at least a year or so. You’ll need the following to begin:

Moderate knowledge of manipulating variables and pictures

Rm2k3 installed

Everything from the first tutorial all done

If you’ve gathered all these things move on to the steps.

STEP 1



We’ll being by letting the enemies attack. Now, you have two choices:

1)EASY WAY: Simply zoom in a new picture

2)HARD WAY: Have six copies of the enemy picture, with one at the normal distance, one right in your face (attacking and hitting), and two in between and another while it’s lunging at you (and hitting your shield), and a last one for returning).

Note that this is meant for animals or something of the sort that physically attack, not humanoid beings with guns or whatever.

To do the easy way:

Add a parallel process event on the battle map (this will be a third one). Make as many pages as movement types. On page 1, use the precondition that the variable for the movement type is equal to 1, and so on. Within each page have it wait however many seconds as needed, change to an attacking picture, then have it quickly (like 5 seconds) zoom in to 500% and move toward the center. Check the ‘Wait until Done’ box then have a fork to check if the switch ‘shield’ is OFF. In the yes case, leave a comment to remind you to return. We’ll go back to this later. In the else case, play some random sound effect then return the picture to the first one and unzoom it and move it to 160,120.

Hard Way:

After preparing the pictures, simply do it the easy way, but do the pictures as following (it looks smoother):

Have it switch to the first in-between picture and zoom in to 200% and switch to the second picture (150% zoom, but the picture should look more attacking-ish and should’ve been about 1.5 times the size of the first so it looks smoother now), zoom in to 250% of that, then, before switching, immediately check if the shield is on or not. If it is, switch to the [hitting shield] picture and have it at 200% zoom (it should been about 1.5 times the previous picture as well) and deal no damage, and do the same thing if it hit, except with the corresponding picture and leave the comment (the whole attacking thing should occur in about 3-5 seconds). Then have it switch to the returning picture (same size as the second lunging one) and have it zoom back to 200% size from around 300%, then switch to the normal stance and zoom back to 100% size from there.

STEP 2



The shield should be rather simple. Go to the second page of the VERY first event, and, in the key processing, let it accept SHIFT as well. Add another fork in the ELSE case to check if the Action Key (5) was hit that checks if shift was hit (7). If it is, you can (optionally) tint the screen some color to show that you turned on your shield for a few seconds, turn on a switch, and have it wait 3 or so seconds (this will leave the shield on for 3 seconds). Quite basic.

STEP 3



Go back to the damage part in the enemy’s attacking pages. First of all, simply flash screen, play a sound, maybe shake the screen a bit. First check if the character’s MP (which should be renamed ‘Shield’ or SH or whatever in the database) is equal to 0. If it is then lower HP by however much attack the enemy has. In the else case lower the MP instead. Now, in the else case, have it check if Shield is 0 now. If it is, have it set a variable named counter to x. To get x, take however many seconds the shield will be stunned (before it begins to regenerate) and multiply it by ten. Now, in the second page of the main event, have it wait .1 seconds at the end, then lower the variable Counter by 1. It checks if Counter is less than or equal to 0, and if it is, have it increase MP by 1. If it isn’t, then don’t do anything. Then use my HP/MP Bar based on percentages to show HP and MP.


Congratulations! You’re done! Here’s a good way to balance it:

Have enemies deal about 20-60 damage per hit. Your shield regenerates very fast (after the wait if it breaks, 10/second), and give the character a max shield of 200 or so, with an HP amount of 80 or so.

Anyway, have fun!