RM2K3 CBS TARGETING HELP
Posts
Pages:
1
ok so I have been having issues with my targeting system for my CBS I am making. I personally have no idea what I am doing lol yet I do...
I want it simple just scroll between a max of 4 monsters. It uses a variable Monster Count that is made before the battle actually starts that determines how many monsters show up on the field, this number does not change when the monsters die though so its set to 1-4.
So The first scrolling I did went through fine but glitched when monsters died, so I made switches for each monsters death...Then my mind goes blank...
So I have variables and switches and common events for this and yet I am stumped how to actually make this work out.
Can anyone help me make this targeting system?
Variables made:
-Target Cursor Controls (for movement)
-Target Cursor (for what monster it is on)
-Monster Count (How many monsters are on the field at a time 1-4)
Switches made:
-E1 Dead
-E2 Dead
-E3 Dead
-E4 Dead
-Targeting (used for the common event Targeting since it is a Para Process)
I have it set to auto target Monster 1 at the start of the system, but from there I am so confused my head hurts... plz assist any way you can thnx
I want it simple just scroll between a max of 4 monsters. It uses a variable Monster Count that is made before the battle actually starts that determines how many monsters show up on the field, this number does not change when the monsters die though so its set to 1-4.
So The first scrolling I did went through fine but glitched when monsters died, so I made switches for each monsters death...Then my mind goes blank...
So I have variables and switches and common events for this and yet I am stumped how to actually make this work out.
Can anyone help me make this targeting system?
Variables made:
-Target Cursor Controls (for movement)
-Target Cursor (for what monster it is on)
-Monster Count (How many monsters are on the field at a time 1-4)
Switches made:
-E1 Dead
-E2 Dead
-E3 Dead
-E4 Dead
-Targeting (used for the common event Targeting since it is a Para Process)
I have it set to auto target Monster 1 at the start of the system, but from there I am so confused my head hurts... plz assist any way you can thnx
You can do these by the help of using pointers.
Make a set of consecutive variables for the enemies (for example variable 51 to 55).
Make an event for each enemy, and at the start of a battle, store the event ID values in the variables from 51 to 55.
Now, use a variable which starts at say value 51. This value should go to 52 if you press the down button. let's say that in variable 52, there's the number 13 which is the ID of one of the enemies. You can make use of this to call an event page from that very enemy by getting that value and then have another variable with the correct page number as a value.
The page could just be like:
variable enemy screen x = this screen relative coordinate x
variable enemy screen y = this screen relative coordinate y
variable enemy screen x = + 16
show picture cursor at enemy screen x, enemey screen y
Now you can easily show which enemy you're targetting. Once an enemy is killed, say enemy with ID 13. you check if variable 51 has the value 13. if not, then you check variable 52 and so on. if you find it at variable 52, you take the value of variable 53 and store it in 52, and the one in variable 54 and store it in 53 and so on. This effectively removes the enemy out of the possible list of targets, so that you can only target living enemies.
If you're unfamiliar with pointers, then I strongly suggest you get familiar with them (tutorial link)
This all probably makes a bit more sense if you understand the use of them.
If or once you have a fair grasp of pointers, I could let you take a look at a CBS I have lying around with the intention of writing a tutorial on it at some point. It's rather WIP, but enemy targetting is fully functional.
Make a set of consecutive variables for the enemies (for example variable 51 to 55).
Make an event for each enemy, and at the start of a battle, store the event ID values in the variables from 51 to 55.
Now, use a variable which starts at say value 51. This value should go to 52 if you press the down button. let's say that in variable 52, there's the number 13 which is the ID of one of the enemies. You can make use of this to call an event page from that very enemy by getting that value and then have another variable with the correct page number as a value.
The page could just be like:
variable enemy screen x = this screen relative coordinate x
variable enemy screen y = this screen relative coordinate y
variable enemy screen x = + 16
show picture cursor at enemy screen x, enemey screen y
Now you can easily show which enemy you're targetting. Once an enemy is killed, say enemy with ID 13. you check if variable 51 has the value 13. if not, then you check variable 52 and so on. if you find it at variable 52, you take the value of variable 53 and store it in 52, and the one in variable 54 and store it in 53 and so on. This effectively removes the enemy out of the possible list of targets, so that you can only target living enemies.
If you're unfamiliar with pointers, then I strongly suggest you get familiar with them (tutorial link)
This all probably makes a bit more sense if you understand the use of them.
If or once you have a fair grasp of pointers, I could let you take a look at a CBS I have lying around with the intention of writing a tutorial on it at some point. It's rather WIP, but enemy targetting is fully functional.
Pages:
1













