Habilidade De Detecção No RPG Maker

4 de outubro de 2011

Tutorial de Scan Attack feito por DanioBoy201 que ensina como criar uma magia, que ao ser usada num combate, mostra o total de HP e MP de um monstro e suas fraquezas, se tiver alguma, num jogo ou projeto de RPG Maker 2000/2003. Este tutorial usa switches, programação por eventos e códigos de mensagens destas versões do RPG Maker.

How do I make a scan attack?

STEP 1 – Making the skill

The first thing you should do is go into your skill/magic editor in your database. Make an attack called ‘Scan’ or whatever you please and make that skill a switch, then make a switch named ‘scan used’, and make that switch activated by the skill you are making. You should next make an attack animation that will represent the attack when it’s used (It will be needed later on in the script.).

STEP 2 – Making a single enemy formation scan

(If you wish to know how to make a multiple enemy formation scan, please jump down to step 3.)

Single enemy scans are pretty easy. Start by making a in-battle script for the formation that is triggered by the switch activated by your scan attack. Next in the event window start by making and setting two variables. One representing the enemy’s HP, and the other representing the enemy’s MP. Set them by selecting the option being ‘set’ and the operand being the 1:enemy’s HP/MP(Which ever one you are setting.). Next insert a ‘show battle animation’, and select the animation you made for the scan attack and set it for 1:enemy. After that instert a message saying somthing like this, we’ll use one of Project Gemini’s monsters for this.

Pigman:\!
HP: \V[*]/40
MP: \V[**]/10

Replace the ‘*’ with the variable number representing the enemy’s HP, and the ‘**’ with the variable number representing the enemy’s MP.

Then insert another message saying the monster’s weaknesses(if the monster has any.). Then turn the switch that activated this event off. When your finished, the event window should say all of this, we’ll use the single pigman for an example.

<>Variable OP:[0001:Enemy 1 HP] Set, 1:Enemy 1 HP
<>Variable OP:[0002:Enemy 1 MP] Set, 1:Enemy 1 MP
<>Variable OP:[0003:Enemy 2 HP] Set, 2:Enemy 2 HP
<>Variable OP:[0004:Enemy 2 MP] Set, 2:Enemy 2 MP
<>Variable OP:[0005:Enemy 3 HP] Set, 3:Enemy 3 HP
<>Variable OP:[0006:Enemy 3 MP] Set, 3:Enemy 3 MP
<>Fork Optn: 1:Enemy 1-ActionPsb 
  <>
:End Case
<>Fork Optn: 2:Enemy 2-ActionPsb 
  <>
:End Case
<>Fork Optn: 3:Enemy 3-ActionPsb 
  <>
:End Case
<>

That’s it for the single enemy formation scan tutorial!

STEP 3 – Scanning multiple-enemy formations

(This is a little harder than before, so I sudgest that you read the single-enemy formation scan tutorial first.)

Start by making an in-battle script that is triggered by the switch the scan skill activates, then create and set variables for each enemy’s HP&MP(We’ll use a 3 enemy formation from Project Gemini as an example.). Then make fork options equal to the number of enemies in the formation. The option should be for monsters possible behavior, and there should be one monster assigned to each fork option. It should look like this so far:

<>Variable OP:[0001:Enemy 1 HP] Set, 1:Enemy 1 HP
<>Variable OP:[0002:Enemy 1 MP] Set, 1:Enemy 1 MP
<>Variable OP:[0003:Enemy 2 HP] Set, 2:Enemy 2 HP
<>Variable OP:[0004:Enemy 2 MP] Set, 2:Enemy 2 MP
<>Variable OP:[0005:Enemy 3 HP] Set, 3:Enemy 3 HP
<>Variable OP:[0006:Enemy 3 MP] Set, 3:Enemy 3 MP
<>Fork Optn: 1:Enemy 1-ActionPsb 
  <>
:End Case
<>Fork Optn: 2:Enemy 2-ActionPsb 
  <>
:End Case
<>Fork Optn: 3:Enemy 3-ActionPsb 
  <>
:End Case
<>

Then when the first fork condition starts, the first thing should be the battle animation of your scan attack on the enemy the fork option represents. Then display the message;

Enemy Name:\!
HP: \V[1]/*
MP: \V[2]/**

Replace the ‘*’ with that enemy’ HP max, and the ‘**’ with that enemy’s MP max.

Then instert another message stating that enemy’s weakness. Repeat this pattern with each enemy, but the variables in the message should be \V[3] and \V[4] for enemy number two, and \V[5] and \V[6] for enemy number three. When your all finished, the complete event should look like this:

<>Variable OP:[0001:Enemy 1 HP] Set, 1:Enemy 1 HP
<>Variable OP:[0002:Enemy 1 MP] Set, 1:Enemy 1 MP
<>Variable OP:[0003:Enemy 2 HP] Set, 2:Enemy 2 HP
<>Variable OP:[0004:Enemy 2 MP] Set, 2:Enemy 2 MP
<>Variable OP:[0005:Enemy 3 HP] Set, 3:Enemy 3 HP
<>Variable OP:[0006:Enemy 3 MP] Set, 3:Enemy 3 MP
<>Fork Optn: 1:Enemy 1-ActionPsb 
  <>Show Battle Anim.: Your scan anim, 1:Enemy 1(W)
  <>Messg:Enemy 1:\!
:       :HP: \V[1]/Max HP
:       :MP: \V[2]/Max MP
  <>Messg:Enemy weakness goes here
:End Case
<>Fork Optn: 2:Enemy 2-ActionPsb 
  <>Show Battle Anim.: Your scan anim, 1:Enemy 1(W)
  <>Messg:Enemy Name:\!
:       :HP: \V[3]/Max HP
:       :MP: \V[4]/Max MP
  <>Messg:Enemy weakness goes here
:End Case
<>Fork Optn: 3:Enemy 3-ActionPsb 
  <>Show Battle Anim.: Your scan anim, 1:Enemy 1(W)
  <>Messg:Enemy 3's Name:\!
:       :HP: \V[5]/Max HP
:       :MP: \V[6]/Max MP
  <>Messg:Enemy weakness goes here
:End Case
<>Change Switch: [0001:Scan used]-OFF Set
<>

That’s all for the scanning tutorial!
by DanioBoy201

Informações adicionais

Observação: se você gostou deste post ou ele lhe foi útil de alguma forma, por favor considere apoiar financeiramente a Gaming Room. Fico feliz só de ajudar, mas a contribuição do visitante é muito importante para que este site continua existindo e para que eu possa continuar provendo este tipo de conteúdo e melhorar cada vez mais. Acesse aqui e saiba como. Obrigado!

Deixe um comentário

Inscreva-se na nossa newsletter!