Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Targetting enemies
« previous next »
  • Print
Pages: [1]

Author Topic: Targetting enemies  (Read 2733 times)

Offline nrsisyourbuddy

  • Initiate
  • *
  • Posts: 46
Targetting enemies
« 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.
Logged

Offline Dragonium

  • Aieee!
  • Staff
  • Royal
  • *
  • Posts: 3,786
  • MY PRISON IS SHAME
    • Dumb Youtube Stuff
Re: Targetting enemies
« Reply #1 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.
Logged

Offline nrsisyourbuddy

  • Initiate
  • *
  • Posts: 46
Re: Targetting enemies
« Reply #2 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.
Logged

Offline nrsisyourbuddy

  • Initiate
  • *
  • Posts: 46
Re: Targetting enemies
« Reply #3 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 :)
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Targetting enemies
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum