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.

Need to change an enemy's details during a fight

tatao

Member

I would like to change an ENEMY's stats during a fight
(for example when the enemy has 75% or less HP, its dexterity increases)

but although i know dexterity is "dex", i don't know how to call it for the enemy)

its number in the database (ID) is 21

thanks in advance
 

Mac

Member

By elements ranks do you mean, change the enemies elemental attributes?

If so, go into Game_Enemy and you will find this line:-

Code:
table = [0,200,150,100,50,0,-100]
result = table[$data_enemies[@enemy_id].element_ranks[element_id]]
 

tatao

Member

this is not exactly what i wanted but i assume $data_enemies is going to be what I wanted.

$data_enemies[20] is the 20th monster right?

$data_enemies[20].element_ranks = [0,1,0,2,3 etc] should modify the resistances to each elements, right?
 

tatao

Member

sorry to double post, but i do not seem to understand what i did wrong

$data_enemies[20].element_ranks = [2,3,3,2,2,3]

asusming that there are 6 attributes (elements) total in my database

what's wrong?

Also:
this does not seem to change anything:

$data_enemies[20].battler_hue = 160

i thought it would change the enemy's color?
 

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