Trying to make a custom ABS using variables this is what i have so far.... umm help?

Screenshot_11.jpg


MOB HP is how much hp this event has. i put the random control variable because i want to do random amount of dam to said animal before it does with a chance to auto kill it which works and IF the random does not land on a 0 you get attack instead but my problem is how to set up random abount of dam that can be done to the player. if player has more then 1 hp knock the player back to a random location 1 block away from the event.....

im i missing anything or have i done anything wrong with this.....
player is a Cat mind you xD THIS IS a really big mouse why i would like to set something up like this

is there a way to show how much hp this event has without using a plug-in?

Look at the second screenshot which actually looks better hmmm

trying to set HP for said mob
it does say mob has 100 BUT RNG is doing dam but it still showing mob has 100 hp vs whats left
how do i make the RNG Damg take off the amount of hp said event has
I only took a quick look, but seems like you've mixed things up. You have to make a variable 'enemy HP' and then when you roll your random damage, you subtract that damage from that HP variable. That gives you the remaining HP of the enemy. Then you put your conditionals.

Control Variables: Enemy HP = 10 [set this in another event that only runs once]

Control Variables: Random Damage = Random 0-10
Control Variables: Enemy HP - Random Damage
IF Enemy HP <= 0
-> Enemy Dies
ELSE
->Control Variables: Random Damage = Random 0-100
->Change HP of player: -Random Damage

I think it's better to look for a plugin for the enemy HP bars. If you want to make it without plugins, I guess you could have a parallel process that keeps showing a green bar picture at the enemy coordinates and you use a variable at the scale X script call spot that gives a percentage depending on enemyHP/enemyMaxHP.

EDIT: Edited to remove the need for player HP variable, since you're using your normal player HP.

EDIT2: You have to set the 'Enemy HP' variable outside that event, otherwise everytime you interact with that it keeps setting your enemy HP to 10.
Thank you rpgLord69 ill do this : )


How would i do this ? how would this work with more then one event
Control Variables: Enemy HP = 10 [set this in another event that only runs once]
Note the edit I just made a minute ago, LOL. You have to set the enemy HP variable in another event. Otherwise it just keeps setting it back to 10 every time you touch it.

EDIT: So when you go to the map with those abs enemies, you can have an autorun event there that sets the enemy HP variables. And then you just erase the event or flip it to self switch A empty page, if those enemies are there only once.

EDIT 2: LOL, I keep making edits, but yeah, you also need to of course have the conditional with "if enemy hp is less or equal to 0".
what if i want it to run threw the whole game? would a common event work?
Well then like I said above, you can have the autorun event which sets the enemy HP variables to just erase event itself, but not flip a page. That way it runs again when you re-enter the map.

But then you also need to flip off the self switch A of your mouse event that you've killed and turned to an empty page (you need script calls for that).
$gameSelfSwitches.setValue([MapID, EventID, 'A'], false);
You can run that (in the same autorun event that sets the enemy HP variable) to bring your killed mouse event back.
Of course you could also just erase the mouse event when you kill it. That way it dies and comes back when you re-enter the map without the need of self switches.
i have a respawn event system set up : ) i can't seem to get what you posted o.o? did i do this right?
my common event
What is not working? Seems ok to me (if you have some event where you turned on that common event switch 63 when entering the map). Also, right now your show text can also show negative values for the enemy hp.
I believe what OP means is that they want this system to work with more than one enemy, which means that each enemy event needs to have their own HP value stored in a unique variable.
If you have a relatively small number of enemies in the game, then you can make this work without a plugin, just use a different variable for each enemy. However, if you have a lot of them... then this system is not sustainable.

An easy plugin solution (which I used in the past for a similar purpose) is Yanfly's self variables. It would allow you to store infinite HP values in a single variable, and every enemy event will track its own individual HP value without affecting the others.

Also, you should have a separate page in each enemy event that will initialize its HP value, before switching to the main page of the combat.
I GOT IT WORKING FINALLY!!!! THANK YOU!!!

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-custom-abs-using-variables-this-is-what-i-have-so-far-umm-help.160515/