Bulletcaster

Warper
Member
Joined
Jan 22, 2018
Messages
1
Reaction score
0
First Language
German
Primarily Uses
RMMV
Hi guys, this is actually my first time posting a thread on this website. I hope I am easy to understand.
I have the following situation:

I have assigned certain enemy attributes to variables for each of them. I used the command "Control Variables"
In this case for:
enemy ID #5 Current HP --> V[1]
enemy ID #5 MAX HP --> V[2]
enemy ID #6 Current HP --> V[3]
enemy ID #6 MAX HP --> V[4]

Both enemy 5 and 6 have 500 max hp.
Also, lets consider current hp to be 370hp for #5 and 450hp for #6.

The idea is, to create an attack that takes the current damage dealt to the specified enemies (#5 and #6), make some calculations, and return it to the target.

Whether I create an event with parallel running span or a common event linked to an event in the map, or even on the troop events,
the damage returned is always 0.
c=((v[1]/v[2])-1)*-1; d=((v[3]/v[4])-1)*-1; e=d+c; e<=0?e*-1*v[4]+(v[1]*c):e>=0?e*v[4]+(v[1]*c):0;

If the variables were substituted with the expected values, it would look like:

c = (( 370 / 500 ) -1 )* -1; d = (( 450 / 500 ) -1 ) * -1; e = d + c; e <= 0? e * -1 *500 + (370*c):e >= 0? e * 500 + (370*c): 0

Result as damage output should be: 276

I have another one that uses the caster and the target in the formula, instead of the Variables.. and that works just fine.
However, this one doesn't :-(

I attached some Screenshots too. Sorry for it being in German, language was set automatically.
(In the command list, it says "Control Variables" and my Plugin list looks messy too XD)

Thanks in advance for anyone who is willing to help me in this case.
 

Attachments

  • Control Variables.png
    Control Variables.png
    198.5 KB · Views: 8
  • Plugin List.png
    Plugin List.png
    293.9 KB · Views: 8
Last edited:

Latest Threads

Latest Profile Posts

Ami
tomorrow is the finale of my Endurance
2dfloor.png
What a fun tileset I've got here so far!
Minecraft Tiles, Maid Day, Custom Menu, Retry at GameOver, Save in Appdata | RPG Maker News #36

side view special bust.png
Reworking the art for the 'special busts' in important game dialogue. Potentially replacing the more 'dead-on' look of the original:
original.png

Forum statistics

Threads
111,263
Messages
1,059,683
Members
144,547
Latest member
Chaotic_Nyoom
Top