How to make an attack chain more when a spell is used?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
Eonhetwo
Red Slime
Posts: 36
Joined: Fri Oct 16, 2020 4:56 am
Location: Usa

How to make an attack chain more when a spell is used?

Post by Eonhetwo »

Hello! I'm new here, and to the OHRRPGCE so just wanna say it's good to be here. I'm working on a battle system for a game and had one question.. with maybe a couple minor others as well.

Ok, so here's my situation and what I want to achieve; My hero has a basic melee attack that hits once. He also has a magic spell that, when cast, allows that melee attack to chain into a combo. What I want is to be able to cast that magic spell a second time, allowing the attack to chain even further into an even bigger combo.

Here's my setup; I've got three attacks (whack, bop, and smash) and one spell (combo trigger)

The first attack (whack) chains into the second (bop) with the condition of a tag check. If (always) and tag 4=On then chain into bop.

Now my spell, combo trigger, has the following in the "tags" menu;
On Use
If (always)
Set tag 4=On
On use
If tag 5=on
Set tag 6=On

Ok, so this works to activate that bop chain. If I whack without using combo trigger, there is no bop.

OMG I totally figured it out while typing this... Ok so I got the three hit combo down when using the combo trigger twice.

So NOW my question is.. How do I reset all these tags I flipped after a battle? They stay on so on the subsequent battles he starts off with the whole whack bop smash combo.
Just a vessel for dank memes
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7449
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Hello, and welcome!

I think the best way to reset the tags after battle is with an after-battle script.

Code: Select all

plotscript, after battle, won, begin
  set tag(4, off)
end
After you compile and import the script, you can set that as the global After Battle Script in the "Edit General Game Data" / "Special Plotscripts" menu.
Eonhetwo
Red Slime
Posts: 36
Joined: Fri Oct 16, 2020 4:56 am
Location: Usa

Post by Eonhetwo »

Thanks! That worked perfectly. Are you James Paige? I'm so sorry about that fatal marshmallow incident...

But thanks for making this engine! Really appreciate it.
Just a vessel for dank memes
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7449
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

It was tragic! The marshmallow burns were so extensive that there was only enough of me left to reconstruct as a hamster.

And you are welcome! :)
Post Reply