Post including demo DL link is in my sig. Spoiler for :
This was originally a full event-custom-action-battle system tutorial. Then I found a similar tutorial, so I translated this into just a battle intro tut. The other event battle system tutorial is here:
http://www.hbgames.org/forums/showthread.php?t=17121 However, it does not have ranged and Area of Effect functions. So I will briefly explain the algorithms to do them below:
Mm, well for the range and AoE it's almost like "addons". I'll just briefly explain it here on how to implement them, at least how I do them. Ranged is the simpler of the two, you simply make a 'through' event (projectile) and put it off the screen somewhere. For the hotkey where you press "shoot", it should set the event of the projectile event at where the player is (remember that you have an event that keeps tracking the X and Y of player onto two variables) and face where the player is facing (conditional branches for each direction). Then, change the graphic of the event to the projectile char-set (arrow char set, for example. Easy to make, just draw some sticks and set them onto an ready-made char set for positioning). Next, set a move event command for the arrows to go however many steps forward. (If you want, you can have a custom distance-variable, that way you can increase or decrease the distance that arrow goes under certain conditions. To implement this, you use a 'Loop' command. Open a loop up, and put 'move forward' once inside. Still inside the loop bracket, make a variable 'count', and make count = count + 1. Next, still inside the loop bracket, make a conditional branch that has the condition count = DISTANCE (where DISTANCE is the distance variable you want the arrow to go for), and if it matches that condition, BREAK LOOP command activates. [This is basically a do-while loop replica for eventing for those that knows some programming]) Then, on the parallel processing event that you have running seperately that tracks player's and enemies' X and Y variables, make 2 new variables; ProjectileX and ProjectileY. Set them to equal to the projectile event's X and Y coords. Now for the 'hit check' event; you simply compare whether the variable monsterX = projectileX, and if it does then compare whether monsterY = projectileY. If it does again, then do whatever you want as a monster gets hit in that conditional branch. Remember to do this check for every monster. (That's why I only limit my max enemy number and player number at 4 each, or it's too much hassel to check everything.) P.S. Remember to do some graphic/sound notice when the monster is hit. Perhaps a knock back, a flash of the monster character, a squeal, something along those lines. As for Area of Effect; you need 8 variables. The top left corner(x,y), top right corner(x,y), bottom left corner(x,y) and bottom right corner(x,y). Basically, you have an area with each of the 4 corners (square area) cornered out. When you check, you check whether the enemy's X is greater than the minimum X yet less than the maximum X, then whether the enemy's Y is greater than the minimum Y yet less than the minimum Y. Oh, and to get those corner variables, you have a center point you release the area of effect at. I usually start with the player's location. So with that center, you calculate each x and y accordingly. For example, if the range is 4x4 square like I used, then that means from the center to the left-most point is a distance of 2, same with the upper-point. Hence, to get the left upper corner, your center x goes under the calculation of x=x-2, y=y-2. ^ | | - - C And repeat the calculation for the rest of the points accordingly. That's basically it in a nutshell. ADVANCED BATTLE INTRO WITH EVENTING PICTURES
[/size]
Throw that mere transition command out of the window, it's a disgrace to your game! For a refreshing animated battle intro, you can employ full use of picture manipulational events.
I'll throw this screenshot of my intro pic manipulation event log here, but just skim over it first; and
look at the NEXT TWO SCREENSHOTS FIRST; then come back to it . It'd make more sense then.
Now, here's what that does to the scene, I will try to demonstrate with 2 screenshots taken during the animation (To see the actual full resulting animation, test the sample CBS beta in the link posted above):
Numbered ID:
7 BACKGROUND
8 TOP SWORD COMING IN FROM THE LEFT
9 BOTTOM SWORD COMING IN FROM THE RIGHT
11 'VS' TEXT ZOOMING IN FROM THE CENTER
12 FRAME OF THE FACE PIC FOR FIRST HERO
22 FACE PIC OF THE FIRST HERO
13 FRAME OF THE FACE PIC FOR SECOND HERO
23 FACE PIC OF THE SECOND HERO
16 FRAME OF THE FACE PIC FOR THE FIRST ENEMY
26 FACE OF THE FIRST ENEMY
17 FRAME OF THE FACE PIC FOR THE SECOND ENEMY
26 FACE OF THE SECOND ENEMY
They are still in motion, heading to their destination locations as blue arrows indicate.
And here is their destination locations, fully arrived (at the 40 frames of WAIT command in the EVENT LOG screenshot above):
You can match the number IDs of each pic with the one on the previous screenshot when they were still moving to the places.
They pause there for 40 seconds, then they go ('move picture') the opposite direction as they came until they all go off the screen (I also used 'rotate picture' command as they leave to fancy it up a little, see the event log screen shot above). When they're done moving off the screen, (WAIT for the amount of frames you set them to take to get to their disappearing position), erase picture to all pics.
NOW, refer back to the event log screenshot before the above two screenshot and see what happened there.
But uncle Reives, how do I know what coordinate to move each face pictures to? You just have to do some minor calculations.
The RMXP game-play screen is 640x480 pixels in size. If a point's position is defined by (x,y), as you go down the screen, Y increases. As you go right of the screen, X increases; and vice versa. So, here:
(Hint: Always have a reference point when calculating where your wanted coordinates are at! If it's close to the center, count the coords from the center point! (E.g. if it goes left, x decreases, if it goes up, y decreases, vice versa.) It might seem a little complicated at first, but when you think about it, it should be straight forward. Picture a canvas, labeled with coordinates. If you make a movement, how will the coordinate change? To the right? To the left? And reverse calculate it to frame out the coordinate you want.
P.S. Incorporate everything into common events, so you can call different face pictures for different battles.