The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: Kularian on October 30, 2011, 01:23:39 PM

Title: [Resolved]RPGXP - Setting an Enemy's ID to a variable
Post by: Kularian on October 30, 2011, 01:23:39 PM
Playing around with a short cheesy game, and of course, I feel the need to overcomplicate things which has piqued my interest.  I have a skill that deals no damage, but has a variety of effects based on which type of enemy it hits.

I'm having it call a CE to resolve, but I realize that I don't have a way to specify the effect based on the type of enemy hit.  I'd want it to do something where...if a Bird was targeted, let's say, it wouldn't be airborne and could thus be hit by Earth Elemental attacks for a round or two.  Or if used on a Lava type, it would get doused which would increase its defense, but lower its speed, etc etc.  It's purely a situational-based skill, I would just need it to 'know' what type of enemy it's targeting.

As a work around, as per the title, if I were able to set the Enemy's ID based on it being targeted into a variable, I could make it work that way as well. 

Thanks!
Title: Re: RPGXP - Setting an Enemy's ID to a variable
Post by: Mjustin on October 31, 2011, 04:34:41 PM
Have the common event simply turn on the switch for a battle event. Customize the battle event for each troop, and have the battle event turn off the switch when it's done. Also, set the span to "moment".
Title: Re: RPGXP - Setting an Enemy's ID to a variable
Post by: Kularian on November 01, 2011, 05:42:49 AM
That still doesn't solve the issue of having multiple types of enemies in one troop.  I guess I could avoid that for now, though.  I can use this as a workaround until I figure something else out.  Thanks bro
Title: Re: RPGXP - Setting an Enemy's ID to a variable
Post by: Mjustin on November 01, 2011, 06:52:55 AM
I thought of a way. Make the skill inflict a state with non-resistance and priority level 0. Make the battle event check which enemy is inflicted with the state, and then resolve the effect and remove the state.
Title: Re: RPGXP - Setting an Enemy's ID to a variable
Post by: Kularian on November 01, 2011, 11:35:08 PM
Oh-ho.  I like it.  Simple, but it works.  Thanks!