Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Zexion on March 16, 2011, 11:17:16 pm

Title: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 16, 2011, 11:17:16 pm
I read the manual but i think i misunderstood, or i'm doing it wrong or something.
First off in the manual it says:
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: LiTTleDRAgo on March 16, 2011, 11:32:42 pm
it should be

Quote$game_map.battlers_group(2).size == 0
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: The Niche on March 17, 2011, 05:01:03 am
Actually, I'm pretty sure it's:

$game_map.battlers.size == 0
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Blizzard on March 17, 2011, 05:06:28 am
That would include lifeless objects and generally every event that you turned into an enemy with \e[ID] regardless of the group.

EDIT: This here should be the most convenient way:

Quote$game_map.battlers_group(BlizzABS::Alignments::ENEMY_GROUP).size == 0

Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 17, 2011, 09:48:01 am
first: WOW lol lots of help in 1 day :P or 2 idk how long its been lol

Second: Well I put the code that blizz said, and the error is fixed, but nothing happens now. I kill all the enemies, but the cutscene won't play.
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: LiTTleDRAgo on March 19, 2011, 10:31:47 am
then try this
Quote$game_map.battlers_group(2).size == 0

Title: Re: How to check how many enemies are on map Blizz Abs
Post by: G_G on March 19, 2011, 11:21:48 am
Open up the Blizz abs config and go to the groups ot alignments tab. Look for the id of the group you want checked.
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 19, 2011, 12:19:28 pm
@LiTTleDRAgo tht one didnt seem to work either...

I don't know whats wrong with this lol. Im just using a simple event with a script call to do a cutscene. It's exactly the way I said in my earlier post except now the script: is changed to what littledrago posted.

@game_guy is there anything else I need to configure like am I suppose to configure enemies or does it just do it on its own?
I don't mean like making them enemies on the map, I mean like...is there some kind of database edit I'm supposed to do?

I'm not getting annnnny errors at all, but the cutscene doesn't start... I made a temporary fix by making each enemy add to a variable when killed and then checking when that variable is at a certain number, and that works fine except that it doesn't always let me kill all of them before it starts even though I put the exact requirement for the variable to equal the enemies killed.
This is like the intro to my game lol I really need this fix :\.
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: The Niche on March 19, 2011, 02:30:07 pm
Are you sure the event is on parallel?
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 19, 2011, 02:59:02 pm
yeah if you want I could upload a demo of itt cus its really frustrating me.(to many things needed to make a demo lol.)

anyways yeah its on parallel ima screenshot it right now
Spoiler: ShowHide
(http://img858.imageshack.us/img858/7405/problemmm.png)
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: The Niche on March 19, 2011, 07:16:53 pm
Well first of all, capitalise the s in both your messages. Second: try one equals sign. It shouldn't work, but occasionally it does.
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Wizered67 on March 19, 2011, 07:29:31 pm
That really shouldn't ever work :huh:

2 equal signs compares values so only 1 equal sign just wouldn't work right.....
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 19, 2011, 09:19:43 pm
ahh 1 "=" gives me the error again :d also that text isn't reeeallly what its gonna say lol I just wanna test it till it works :P gr why is this happening
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: winkio on March 19, 2011, 09:30:15 pm
try putting

p $game_map.battlers_group(2).size


as the event code for a non-enemy event on the map.  Enter the map, kill the enemies, then talk to that event.  The number that pops up is the number of enemies Blizz-ABS thinks there are on the map.  Tell us what it is.
Title: Re: How to check how many enemies are on map Blizz Abs
Post by: LiTTleDRAgo on March 20, 2011, 12:14:55 am
Quote from: winkio on March 19, 2011, 09:30:15 pm
try putting

p $game_map.battlers_group(2).size


as the event code for a non-enemy event on the map.  Enter the map, kill the enemies, then talk to that event.  The number that pops up is the number of enemies Blizz-ABS thinks there are on the map.  Tell us what it is.


blizz abs bug!!
I make 2 enemies then kill them but the event says the battler is still 2

Quote from: Zexion on March 19, 2011, 12:19:28 pm
I made a temporary fix by making each enemy add to a variable when killed and then checking when that variable is at a certain number, and that works fine except that it doesn't always let me kill all of them before it starts even though I put the exact requirement for the variable to equal the enemies killed.


how about paste this into each enemy page

Wait : 10 Frame(s)
Script : $game_map.rename_event(@event_id, 'defeat')



Title: Re: How to check how many enemies are on map Blizz Abs
Post by: Zexion on March 20, 2011, 12:57:52 am
ommmmgggg lol I did what winkio said and when i first started it said 13, and I was like ohhhh i guess when I did the variable thing I forgot 1 more so it started before I killed all of them, buuuuuuttttttttt. I was right there are only 12 enemies, so when I kill all of them it shows an extra 1 enemy for some reason?? That is why the thing won't start because I have it searching for 0 enemies but it says there is still 1. (even though there are really none on the map)