Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Creating a "Cover" Skill, having trouble!

ChrisL

Member

So I'm creating an RPG, without going into any detail, I'm trying to create a skill for one of my characters that basically recreates the Cover skill from the final fantasy series.  A skill,when used, will make the user jump in front of enemy attacks, defending his allies, so the user takes the physical hit instead of the origional target. 

I'm trying to do this without any custom battle system or any scripting, just plain old switches,events,conditions, variables, and the default battle system.  I am racking my brain on how to make this work, if anyone could help me, I would GREATLY appreciate it.

thanks in advance!
 
Try to event like this.
CE if state "cover" is activated
If
then try to give everyone a state that doesnt allow to take damage. or i dont know. srry but atleast i tried :down:
 
If you're using the default battle system, there's no point doing "jump to coordinates". Here's an idea...

Make a state called "Cover", and in every Troops enemy tab, have this command:
Code:
Condition: Turn 1+1X                 Span: Turn

@>Conditional Branch: [Actor] is [Cover] inflicted
   @>Control Variables: [0001: Random] = Random No. (0...3)
   @>Conditional Branch: Variable [0001: Random] <= 1
      @>Force Action: [1: Ghost], Attack, Index 1
     : End Processing
   @>Conditional Branch: Variable [0001: Random] = 2
      @>Force Action: [1: Ghost], [Skill], Index 1
     : End Processing
   @>Conditional Branch: Variable [0001: Random] = 3
      @>Force Action: [1: Ghost], Do Nothing, Index 1
     : End Processing
 : End Processing

You'll have to repeat that for every single enemy and every single skill they use. It's probably not the best method, but it's the most efficient one without scripting. There probably is an easier way via common events, but this is just what came to mind, and it works.
 

ChrisL

Member

Regi":1eud79p8 said:
If you're using the default battle system, there's no point doing "jump to coordinates". Here's an idea...

Make a state called "Cover", and in every Troops enemy tab, have this command:
Code:
Condition: Turn 1+1X                 Span: Turn

@>Conditional Branch: [Actor] is [Cover] inflicted
   @>Control Variables: [0001: Random] = Random No. (0...3)
   @>Conditional Branch: Variable [0001: Random] <= 1
      @>Force Action: [1: Ghost], Attack, Index 1
     : End Processing
   @>Conditional Branch: Variable [0001: Random] = 2
      @>Force Action: [1: Ghost], [Skill], Index 1
     : End Processing
   @>Conditional Branch: Variable [0001: Random] = 3
      @>Force Action: [1: Ghost], Do Nothing, Index 1
     : End Processing
 : End Processing

You'll have to repeat that for every single enemy and every single skill they use. It's probably not the best method, but it's the most efficient one without scripting. There probably is an easier way via common events, but this is just what came to mind, and it works.

i appreciate the help but i kind of already tried that.  It seemend to work, but the part where it says "force action, attack index 1" , it doesnt hit the character i want it to hit.  Which index corresponds to which character?  there are 8 indexes.

For example, when I tried it out, it worked with character number one (when the command called to attack index 1), but when I tried it on character 2, it still hit character 1 (even when it was set to attack index 2)

any pointers?  what am i doing wrong?
 
Indexes don't refer to the actor or enemy ID, but the position they are in the party/enemy group.

For example, if your party is listed as:
Gloria
Basil
Cyrus
Hilda

Index 1 would be Gloria, 2 Basil, 3 Cyrus, 4 Hilda.
 

ChrisL

Member

Regi":d9r4znvo said:
Indexes don't refer to the actor or enemy ID, but the position they are in the party/enemy group.

For example, if your party is listed as:
Gloria
Basil
Cyrus
Hilda

Index 1 would be Gloria, 2 Basil, 3 Cyrus, 4 Hilda.

ill try it out again when i get home, but i could have swore that index 2 didnt correspond with the second character i had in the party during the battle.  What about index's 5-8?
 

ChrisL

Member

EDIT::

I think I got it working, if it is indeed working, the only thing I was doing wrong was setting the conditions wrong.  I had the conditions for the fight at the default "dont run" setting, but then I re read your post a couple times and noticed you had the conditions set to 1+1X, and now it seems to be working.

Thanks for your help.  I never would have thought that condition would make or break the ability.

Sure is going to suck coding this for every single battle, and setting it up for fights with multiple monsters lol.

Also, it doesn't seem to come into effect with the monster until the round after the skill is used.  So, say I used it round one and even got the skill before the monster attacks, it wont matter until the next round, then he will hit the taunted or covered target 100% (or whatever % I set it to)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top