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,912
Reaction score
2,098
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
916
Reaction score
396
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,761
Reaction score
2,109
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 Posts

Latest Profile Posts

so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.
Hot chocolate and music make studying and note-taking much easier :kaoluv:
Until my hand cramps up from writing too much!
Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png

Forum statistics

Threads
115,268
Messages
1,088,468
Members
149,872
Latest member
ghosted
Top