Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Shadonking on February 17, 2009, 11:41:58 am

Title: Saving the enemies hp
Post by: Shadonking on February 17, 2009, 11:41:58 am
I need to beable to save a certain monsters hp as a variable then when i go to another map i can tell an identical enemy on the map to have the same hp as what that variable says.

im using blizz abs.

if you need more info just ask.


Title: Re: Saving the enemies hp
Post by: nathmatt on February 17, 2009, 04:21:58 pm
found it in the manual under utilities
$BlizzABS.enemy_change_hp(event_id, operation, type, operand, allow_kill)
event_id : either an event ID on the map (a number) or type TROOP to target all enemies on the map or @SELF which indicates at the calling event 
operation : either INCREASE or DECREASE
type : either CONSTANT or VARIABLE
operand : if type is set to CONSTANT, this value represents the constant number to operate with, if type is set to VARIABLE this number represents the variable ID
allow_kill : either KILL or NO_KILL
change : either ADD or REMOVE
state_id : the ID of the status effect to operate with
enemy_id : the ID number of the enemy to operate with
party_position : either the position of the actor in the party (starts from 0!) or PARTY to target all actors in the party
Title: Re: Saving the enemies hp
Post by: Shadonking on February 17, 2009, 05:05:05 pm
thanks, so thats how to change an enemies hp using a variable but how do you cange the variable to the number of the enemies hp.
Title: Re: Saving the enemies hp
Post by: nathmatt on February 17, 2009, 06:11:41 pm
try $game_variables = $BlizzABS.enemy_hp(event id)
not saying it will work just guessing
Title: Re: Saving the enemies hp
Post by: nathmatt on February 18, 2009, 07:05:03 am
im guessing it worked
Title: Re: Saving the enemies hp
Post by: Shadonking on February 18, 2009, 10:22:52 am
just checking it now

edit

it didnt work.


it doesnt say which variable to store the hp and it has a syntax error.

edit

please help, it will be very useful

edit

bump
Title: Re: Saving the enemies hp
Post by: Blizzard on March 07, 2009, 06:48:48 am
I thought I posted this in another topic. I'll be sure to include that kind of syntax in a future release. I left it out this time due to some complications. Anyway, you can use this in the meanwhile:

$game_map.events[EVENT_ID].battler.hp


Make sure it's a battler and that it actually exists.
Title: Re: Saving the enemies hp
Post by: Shadonking on March 07, 2009, 07:47:05 am
thanks blizz, i'll try it out later