ZoeyToonz

Warper
Member
Joined
Aug 2, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMZ
This is my first time using this forum so I don't know if this belongs somewhere else or was already asked before, but here goes. I'm trying to make a ton of my own abilities for my game, some of which have completely different uses in and out of battle. For instance, the ability I'm struggling with is a teleport. In battle, the user's party will just flee. Out of battle, you will be able to return to the overworld map. I have it coded in a way this works, until exiting my first battle. After that, the skill won't work out of battle. I know it has to do with the way my conditional branches are set up, but I can't seem to figure it out.

Also, I don't have a good name yet so, ignore the Japanese I guess...
If anyone is curious, I think it roughly translates to "A Kitsune's/Fox's Trial"
I could be horribly wrong...
 

Attachments

  • Kitsune no Saiban - RPG Maker MZ 8_1_2021 5_42_26 PM.png
    Kitsune no Saiban - RPG Maker MZ 8_1_2021 5_42_26 PM.png
    102.9 KB · Views: 11

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,919
Reaction score
2,102
First Language
English
Primarily Uses
RMMV
What I'd do is run a common event at the start of every battle that checks whether an actor has the skill equipped, and if so, forget that skill and learn the battle version of the skill (requires 2 database entries for the skill, 1 for on-map, 1 for in-battle).
At the end of each battle, run a similar event that checks for these skills and swaps them back to on-map skills.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
945
Reaction score
412
First Language
english
Primarily Uses
RMMV
my thing for this was plugin related.
learn 2 versions, field version has <hide in battle>, battle version has <hide in field>
it looks like the MZ plugin version is visustella's skill/state core in the skill accessibility notetags.

edit: i see in your event that you turned on an 'else' branch in the 2nd check and never used it.
dont think it should be causing any issues but would still fix that anyways.

you also dont have a condition checking if teleporting should be disabled
this would be a switch you just turn on when you dont want them teleporting.

an event version i would get someone with script knowledge to help make 1 check for 'party in battle'
conditional branch: 'script' (edit2: thx @caethyril)

and i see that your teleport is using fixed numbers, this fine if its only a 1 dungeon game.
could also be good practice using position variables here for bigger project warp/teleport and puzzles.
my thing for warp is the transfer event going into a dungeon sets 3 variables "tpMapID" "tpX" "tpY"
(and turns off the restrict warping switch)
then the warp out of dungeon event uses those 3 variables instead of fixed numbers to warp outside the dungeon entrance (and turn on the restrict warp switch again because exiting a dungeon)
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,771
Reaction score
2,123
First Language
EN
Primarily Uses
RMMZ
The game remembers the last troop encountered per session, that's why your approach breaks after one battle.

A non-plugin option could be to use Conditional Branch > Script: $gameParty.inBattle(), e.g.

◆If:Script:$gameParty.inBattle() ◆Comment:Battle effects ◆Abort Battle ◆ :Else ◆Comment:Map effects ◆Text:None, None, Window, Bottom : :Return to the overworld? ◆Show Choices:Yes, No (Window, Right, #1, #2) :When Yes ◆Transfer Player:Overworld (11,9) ◆ :When No ◆ :End ◆ :End
 

Latest Threads

Latest Profile Posts

Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!
I feel the need to inform everyone on the forums NOT to go with Web Hosting Canada for your hosting needs. It is by far the worst customer service and just overall experience I have ever had with hosting and I am Canadian...
BCj
Got another eye surgery monday. Hope I'll recover quick and all's well. A bit tired of surgeries. On a happy note, working on the next chapter of Escalia so hope I can continue soon :)
Celebrating the arrival of autumn in the Northern Hemisphere :)

Forum statistics

Threads
115,366
Messages
1,089,303
Members
150,055
Latest member
Cthulhu95
Top