How can I make a skill which does different things in and out of battle?

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
I want to make a Teleport skill which, when used in battle, causes the party to escape, but when used from the field, causes the party to warp back to a specified location in the central hub town.

Is this possible?
 

Clord

Nya~
Veteran
Joined
Aug 5, 2012
Messages
2,358
Reaction score
385
Primarily Uses
You should be able to use common event and add it to skill. Then make that common event just abort battle. That way it has an additional effect. Then add to that same common event after "abort battle" what else you want it to do.
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
You should be able to use common event and add it to skill. Then make that common event just abort battle. That way it has an additional effect. Then add to that same common event after "abort battle" what else you want it to do.
It won't cause a conflict? Like, the game won't crash if you try and run the escape battle command when not in battle? Or crash if you try and teleport when not on the field?

I also had another skill I wanted to do this with...

In Battle: Increases party's evasion.

Out of Battle: Halves encounter rate.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Close, but not quite.

Something like this will work:

Conditional Branch: Script: $game_party.in_battle? Abort BattleElse TeleportBranch EndYou'll have to look for the right commands to use for Escape and Teleport (maybe teleport using variables if you could go back to different locations, otherwise have another series of conditional branches to determine where to go).That way, there'll be no potential crashes by trying to escape when you're NOT in battle, and if you ARE in battle, it won't make you escape and then immediately teleport. You'll do one, or the other, but not both.
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Close, but not quite.

Something like this will work:

Conditional Branch: Script: $game_party.in_battle? Abort BattleElse TeleportBranch EndYou'll have to look for the right commands to use for Escape and Teleport (maybe teleport using variables if you could go back to different locations, otherwise have another series of conditional branches to determine where to go).That way, there'll be no potential crashes by trying to escape when you're NOT in battle, and if you ARE in battle, it won't make you escape and then immediately teleport. You'll do one, or the other, but not both.


I did it exactly as you said (I only set it to teleport to one specific place) and it doesn't seem to work. Crashes upon using the warp skill.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Thanks Xypher. Sorry PushesTheButtons - I should have checked that.


The correct script to look at, if you'd wanted to follow it up yourself and are comfortable doing so, would be Game_Party.
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
it's $game_party.in_battle without the ?
It seems to work like that. :)

Thanks.

Edit: WAAAAAIT A SECOND!!

There's a problem!

This skill lets you escape from ANY battle, even boss battles!

This.... is a problem >_>

How can I fix this?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Make the skill only available in the battles you want to allow the player to escape from. Or use a switch to say when it should and shouldn't be allowed, and then add another condition inside the $game_party.in_battle check to see if the switch is on or off.


Are your battles random encounters set up on the map properties, or are they all events that use Call Battle Processing?
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV
It seems to work like that. :)

Thanks.

Edit: WAAAAAIT A SECOND!!

There's a problem!

This skill lets you escape from ANY battle, even boss battles!

This.... is a problem >_>

How can I fix this?
When engaging a boss fight conditional branch: If Hero has Teleport Skill: Yes: Remove Teleport Skill. Then add Teleport Skill (another version, but with the same name and does nothing when used). At the end of the battle remove that Skill and add the regular spell back.
 

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top