Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [Eventing] Sorcerer's Ring, How to create projectiles system on maps.
manat31790
post Jul 13 2011, 12:18 AM
Post #1


RPGPlayer
Group Icon

Group: Revolutionary
Posts: 194
Type: Artist
RM Skill: Intermediate




---------------------------------------------------------------------------------------------------
How to Create a Sorcerer's Ring
---------------------------------------------------------------------------------------------------


Introduction
Hello there. Today, I, manat31790, would like to present you how to create a Sorcerer's Ring system for RPG Maker VX. If you don't know what Sorcerer's Ring is, it's a magic device the player in the Tales of game series obtains and uses in a dungeon. You can use a Sorcerer's Ring to shoot magic forward to lit fire and activate magical devices around a dungeon to solve puzzles and open paths. You can also use Sorcerer's Ring to freeze monster's movement on map and let you slip pass it without doing a battle. In RPG Maker VX, Sorcerer's Ring and other similar projectiles like guns and arrows can be made with just a bit help of Ruby RGSS2. Here's how to do it.

Example Map Layout


Step-by-step tutorial
Stage 1: Prepare a Sorcerer's Ring.
Go to the database and create an item or a switch called "Sorcerer's Ring." I'm using a switch, as it is better to manage, though you can also create an item in the database to let you know you have the ring in the inventory.
This is the switch I'll use in this tutorial.

CODE
[0001: Sorcerer Ring Allowed]




Stage 2: Make a shot of fireball.
First, go to your map. Create a blank event with the setting "Through" and "Stepping Animation" on. Name it "Fireball." You can set the speed your desire.


Alright, now we'll start inputting codes for the fireball shooting. Create an event called "Fireball Shoot" and do the following:

1) Have the event set as "Parallel Process," begin and end the event with "Wait: 1 Flame" to reduce lags.
2) Check if you have a switch or an item you need for shooting (in this case, it's [0001: Sorcerer Ring Allowed])
3) Assign a condition branch if a certain button is pressed. I'll use button X as the example. By default, X button is the "A" button on the keyboard.
4) Create two variables: "Action X" and "Action Y." Change those variables to be equal to player's X and Y coodinators.
5) Wait: 1 Flame
6) Assign the event "Fireball" to "Action X" and "Action Y" coordinators. Have the event turned the same way the player does.
7) Control Self Switch A on.

Look at the picture if you can't keep up.



Next, create a new page and set it to "Autorun." Have to event "Fireball" changed its graphic into a fireball, bullet, arrow, or anything you want. Make them move forward for 3-4 tiles then turn the event blank again. Lastly, turn Self Switch A off.



Try it off in a testplay. Turn [0001: Sorcerer Ring Allowed] on, and then press "A" button on the keyboard. Wow! You can now shoot fireball!


Stage 3: Shoot a fireball at an object.
This step will teach you to make the fireball interact with certain events on the map. Let's say, you have a torch which is not lighted, and you want to light it with your magic. To do that, follow the explanation below.

1) Create a new event. Name it "Torch." Set it to have a "Parallel Process" trigger.
2) Assign a condition branch the location of the "Fireball" is equal to the "Torch." This is done easily by inputting some codes on the in the "Script" box on the third page of the Condition Branch. Now, please look at the code below.

CODE
$game_map.events[X].x == "Number"
$game_map.events[X].y == "Number"

These codes determine if the coordinate x and y of the event ID [X] is equal to certain number. [X] is the ID of the event you want to compare, and "Number" is any integer number. Now, see the map below.



In the example, event "Torch" is located at coordinator X =11, and coordinator Y = 6. You want to check if the event "Fireball" has is in the same location as the torch event. The "Fireball" event, if you can remember, had an ID of 2. Now replace [x] with "Fireball's" ID number and replace "Number" with the coordinator number of the "Torch" event. The code then should be like this.

CODE
$game_map.events[2].x == 11
$game_map.events[2].y == 6

If both conditions are met, have a puzzle switch triggered on. In this case, I'll use [0004 Set the Fire] switch. Create another event page to show the result of the torch being lit. If you've followed everything, your "Torch" event pages should be like this.





Testplay it and try to light a torch with the fireball. Voila!



Stage 4: Shoot fireball at a moving traget.
Let's try creating a moving monster that goes on fire when you shoot at it. This can be done similarly to the way you create a torch. Create a monster event and set it to have a "Parallel Process" trigger. Input two conditional branch codes like earlier, but this time, try these codes.

CODE
$game_map.events[X].x == $game_map.events[Y].x
$game_map.events[X].y == $game_map.events[Y].y

These code will compare the location of the events if their X and Y coordinates are equal, in the other word, at the same place. Now, replace [X] and [Y] with ID's of the events you want to compare. Let try having a monster ID: 4 and "Fireball" ID: 2.

CODE
$game_map.events[2].x == $game_map.events[4].x
$game_map.events[2].y == $game_map.events[4].y

Create another page to show the result of your monster torturing. Have it flamed up for a moment before turning it back to normal. Your results should be like this.





Now testplay it and enjoy your monster roasting experience.




Conclusion
That's it for how to create a Sorcerer's Ring and other similar projectile weapons used on a dungeon map. Hope you all have a good day, sirs and madams.

*17-7-2012* Fixed the pictures.

This post has been edited by manat31790: Jul 17 2012, 04:28 AM


__________________________
Do not judge a book by its cover

Recommendation
manat31790's newest resourses for RPG Maker VX atPhoto Bucket!
Romancing Walkers
Lunarea's custom tile
Support

Check out my current Project!

Go to the top of the page
 
+Quote Post
   
Demonfire94
post Aug 22 2011, 08:30 PM
Post #2


Level 3
Group Icon

Group: Member
Posts: 34
Type: Mapper
RM Skill: Advanced




Well I didn't make an puzzle like what your tut was for, but part of it did help me make a puzzle where you have to guide an npc to a switch. Also it's a great tut.


__________________________
Go to the top of the page
 
+Quote Post
   
Amy Pond
post Aug 24 2011, 04:45 AM
Post #3


squiggly wiggly timey wimey
Group Icon

Group: Revolutionary
Posts: 493
Type: None
RM Skill: Advanced




Hey, this is actually pretty nice. Would be great for a sort of map-based battle system that's less complicated and flashy than an ABS. I love the idea of it interacting with scenery (beacons, torches, etc) too, would be nice to see in a game.


__________________________
Go to the top of the page
 
+Quote Post
   
TheBen
post Aug 25 2011, 01:15 PM
Post #4


Intolerable Noob
Group Icon

Group: Revolutionary
Posts: 344
Type: Developer
RM Skill: Beginner




An interesting tutorial. You don't strictly need RGSS2 to do this, but I suppose it's good form to try and conserve variables when possible.


__________________________
QUOTE
Great people talk about IDEAS
Average people talk about THINGS
Small people talk about OTHER PEOPLE

- A plaque on a BBQ restaurant in VA
Go to the top of the page
 
+Quote Post
   
priadluabe
post Feb 14 2012, 08:59 PM
Post #5



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




How do you make the 'fireball' event face the same way as the player character? i can't see an option for it and your pictures aren't displaying anymore
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 01:03 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker