Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: nrsisyourbuddy on August 02, 2008, 11:14:20 PM

Title: Targetting enemies
Post by: nrsisyourbuddy on August 02, 2008, 11:14:20 PM
OK, now, I know there's a question topic on this already, but I was afraid to kick it, as it's 9 days old. Delete this if it's violating the rules or anything, I don't know. Anyway, for targets out of reach of melee weapons, try this:

In Battle events:(using my own game for an example)

Trigger: Galahad uses Attack command
<>Branch if 1:Raven targeted
  <>Call event: Galahad melee/range
  <>Branch if switch: Galahad has range is OFF
     <>Message: <Galahad>
Crap, I can't reach it!
     <>Inflict condition  Galahad


The common event: Call
<>Set Var [????] Galahad weapon, Galahad weapon no.
<>Branch if [????] Galahad weapon equal/more 134    (I had three bows at the time, they all go in the same category, all in line)
   <>Branch if [????] Galahad weapon equal/less 136
    <>Switch: Galahad has range: ON
    end
   :Else case
    <>Switch: Galahad has range: OFF


that's that. The condition should be one of those one turn stuns. I tested this on a small scale, I might've missed something, but, I think it works. If you encounter any bugs, tell me, and I'll try and work them out. Again, if this is violating rules, please delete this.
Title: Re: Targetting enemies
Post by: Dragonium on August 02, 2008, 11:16:53 PM
Looks nice. I haven't tested it but it looks like it'd work fine. Good coding.

Might be better off in Tutorials.
Title: Re: Targetting enemies
Post by: nrsisyourbuddy on August 02, 2008, 11:20:09 PM
Ha, thanks. I hope someone can get use out of this. And I didn't think it would go in tuts for some odd reason.
Title: Re: Targetting enemies
Post by: nrsisyourbuddy on August 03, 2008, 12:19:45 AM
Yeah, I heard that too, which is why I put it here. Oh, and congrats on your new found status Drag. I'm happy for you :)