Creating Field Skills?

TheSoulBlade

Villager
Member
Joined
Apr 28, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMMZ
I'm really sorry as I don't know where to post this thread.

I tried looking up what I wanted but couldn't find anything. Essentially what I need help doing is as follows:

I have a character that is a Mage, he has an ability called Drench that can only be used from the menu. I have created a common event with proper animation and sound effects. This works as intended. I want to be able to use the Drench spell to be able to put out fires, making new paths that the character can take (think Golden Sun puzzles). I am able to do this pretty easily through Events if I "interact" with the fire. However, I don't want to Interact with the fire to use the spell. I was wondering if there is a way that I can select the spell from my menu to put out the fire without "interacting" with it. I was able to do it with switches, but since the common event activates the switch it puts out the fire even if I'm standing nowhere near it.

To sum it up, I want to be able to use the Drench spell from my menu (to keep players guessing if certain obstacles can be overcome, instead of seeing the menu open when interacting and knowing it can be overcome) to put out the fire, but only the one that I am standing next to, and say, not the other fire across the room. Thank you in advance, and again my apologies about thread placement.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
378
Reaction score
350
First Language
german
Primarily Uses
RMMZ
Unfortunatly this is something which is not very well supported in RMMV, but still it is possible.
I would do the following:

- on every Map containing fires, make an event with autostart / parallel process with a switch as condition
- the common event only turns this switch on
- in the event we do a chain of variable operations and if-statements
-- first we store the X, Y-coordinates and direction of the Player in variables
-- now, for each fire, we do 3 if-statements. If the x, y and direction variable match, we distinguish this event. Call an animation, turn on switch "fire xy cleared", or erase the fire event, you can be creative here
- last but not least, turn the switch of this event off, so you don't stuck in the autostart event

This is a not-so-fancy but still simple solution without usage of plugins. There are probably other solutions out there.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,895
Reaction score
1,029
First Language
Dutch
Primarily Uses
RMMV
I know how to event it with images as icons for the spells, but I dont know it othewise.
it basicly tied the image to the common event to use.

I dont know if there is a check if skill(x) is use, fire is out, else nothing happend.
 

TheSoulBlade

Villager
Member
Joined
Apr 28, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Unfortunatly this is something which is not very well supported in RMMV, but still it is possible.
I would do the following:

- on every Map containing fires, make an event with autostart / parallel process with a switch as condition
- the common event only turns this switch on
- in the event we do a chain of variable operations and if-statements
-- first we store the X, Y-coordinates and direction of the Player in variables
-- now, for each fire, we do 3 if-statements. If the x, y and direction variable match, we distinguish this event. Call an animation, turn on switch "fire xy cleared", or erase the fire event, you can be creative here
- last but not least, turn the switch of this event off, so you don't stuck in the autostart event

This is a not-so-fancy but still simple solution without usage of plugins. There are probably other solutions out there.
Okay, I am following along for the most part. My question is the 3rd and 4th steps. How do I make the chain of variables and if-statements (Do I use a conditional Branch?) and how do I store the x and y coordinates as variables? As well as the direction of the player? I haven't messed around with variables too much, but I understand the basics of them and assumed I could do something with them to achieve what I want. Im just not sure how to do it.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
529
Reaction score
275
First Language
thai
Primarily Uses
RMMV
first check all drop down and sub page of variable and condition branch
you will see how much things they can do
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
378
Reaction score
350
First Language
german
Primarily Uses
RMMZ
Okay. In Variable Operation, you can set a variable with the Player's X/Y-Coordinate. But pasunna reminded me, you don't need to store the direction. Let's say, the fire has location 3/5. You store X and Y of the Player. Your if-conditions looks like this

Code:
if x == 3
  if y == 6
    if player is facing up
      clear fire
 

TheSoulBlade

Villager
Member
Joined
Apr 28, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Okay. In Variable Operation, you can set a variable with the Player's X/Y-Coordinate. But pasunna reminded me, you don't need to store the direction. Let's say, the fire has location 3/5. You store X and Y of the Player. Your if-conditions looks like this

Code:
if x == 3
  if y == 6
    if player is facing up
      clear fire
Awesome! Thank you so much, I have it working now. There is one slight problem. When I use the spell from my menu, it calls the common event that turns on my switch. If I am not in the right position, use the spell, then move over to the fire it will auto play the animation from the event and put out the fire without me using the spell from the menu again. Is there a way that I can turn off the switch if the spell is cast while not in position?

EDIT: I answered my own question, I'm tired so I forgot to put the "else" branch as turning off the switch.
 

TheSoulBlade

Villager
Member
Joined
Apr 28, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMMZ
I had been searching everywhere to find an answer to this problem I was having. I appreciate all the help from everyone and decided I will share my events in case others search this up and find it for themselves.

Common Event:
*Turn on Switch "Drench"

Make sure to tie the Common Event with the spell that you use in your menu

I named my 1st variable Player X Coordinates and 2nd Player Y Coordinates

Event 1 (autorun/variable check)
* Control Variables: 0001 = Map X of Player
*Control Variables: 0002 = May Y of Player
*If: Player X Coordinates = 11 (insert x coordinate here instead of 11)
*If: Player Y Coordinates = 10 (same as above but with Y)
*If: Player is facing Left (insert direction)
*Show Animation: Fire 1(fire event), Drench (spell animation)
*Control Switches: #0098 Put Out Fire 1 = On
*Control Switches: #0100 Drench = Off
*
: Else
*Control Switches : #0100 Drench = Off
*
: End
*Control Switches : #0100 Drench = Off
*
: Else
* Control Switches #0100 Drench = Off
*
: End
*
: Else
*Control Switches #0100 Drench = Off
*
: End
*

Again, thank you, everyone, for all of the help! I doubt I would have ever realized I could do this without you pointing it out Aero!

Edit: Makes it a bit easier to save the *Control Variables both as part of a Common Event, so when creating these events for later areas you can just add the Common Event instead of going through all the menus to set all the variables again.
 
Last edited:

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
378
Reaction score
350
First Language
german
Primarily Uses
RMMZ
Actually you put the "switch off"-command at the very end, no need to copy-paste it into every else-branch. Also, this way you can copy-paste the if-chains for every fire you have on this map.

EDIT:
Code:
if x == ?
  if x == ?
    if direction == ?
       switch on: fire1

if x == ?
  if x == ?
    if direction == ?
       switch on: fire2

switch off Drench
 

TheSoulBlade

Villager
Member
Joined
Apr 28, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Actually you put the "switch off"-command at the very end, no need to copy-paste it into every else-branch. Also, this way you can copy-paste the if-chains for every fire you have on this map.

EDIT:
Code:
if x == ?
  if x == ?
    if direction == ?
       switch on: fire1

if x == ?
  if x == ?
    if direction == ?
       switch on: fire2

switch off Drench
Oops, yeah i should have known that, its almost 6 am here and i have been working on this since about midnight (not only this) but it has definitely tired me out! Thanks again for all your help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top