Charas-Project

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

Login with username, password and session length
 

News:

New forum theme up and running!



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

Author Topic: Guards  (Read 2569 times)

Offline Ganderzz

  • The RPG Maker 2k user
  • Initiate
  • *
  • Posts: 4
Guards
« on: August 17, 2005, 07:42:03 PM »
is it possible to make it where something like a guard.. when he see's you something happens (like u go to jail or something)?
Logged

Offline WarxePB

  • Action Sue
  • Royal
  • *
  • Posts: 3,601
  • What killed the dinosaurs?
    • The Gigaverse
(No subject)
« Reply #1 on: August 17, 2005, 08:34:44 PM »
If he's stationary, easily. Just make a few "Touched By Hero" events in his line of sight, and when the hero steps on those events, it does something.

If the guad can face different directions or if he moves, it gets a bit more difficult.
Logged
Blog: The Gigaverse
Twitter: Initial Chaos

Offline Dashman

  • Just too cool for this planet
  • Associate
  • *
  • Posts: 237
  • i like food
(No subject)
« Reply #2 on: August 18, 2005, 12:32:08 PM »
Put the guard on a single square facing, let's say, left, then face up, then face left, then down. The hero must pass left of him. The corridor is 2 steps wide. At the left of the guard put 2 events. Both of them on hero touch. Put a fork condition. If guard is facing left, a battle start, or you get kicked from the place. If the guard is not facing left when you are there, you can pass. I have not tried it, but I think it would work.

But if you want them to move, the method of Warxe_PhoenixBlade would be better, because I think it would be too hard to make them move and see you from a distance.
Logged

Offline Moosetroop11

  • Sage
  • *
  • Posts: 7,398
(No subject)
« Reply #3 on: August 18, 2005, 01:30:50 PM »
Or you could do 4 pages, with a switch each. When the 'face down' switch is active, the guard looks down, and his line of sight for him when looking down is activated, etc. You'll need a parralel process for it to work.
Logged
Maaaaaaaaaaaaaaaaaaaaaaaaaaan I missed this place.

Quote from: drenrin2120
Maaaaaaaaaaaaaaaaaaan I missed you.

Quote from: fruckert
Maaaaaaaaaaaaaaan I missed that welcome.

Offline Bluhman

  • Global Moderator
  • Royal
  • *
  • Posts: 4,977
(No subject)
« Reply #4 on: August 18, 2005, 01:39:26 PM »
Moving guards: When doing this, variables are your friends.

Ok. First you should make 4 variables that determine the guards X and Y, and the players X and Y.

Then make several fork conditions for each direction.

For each direction, check for the following

If the guard is facing left, check for an equal Y value for both the hero and guard, and the guards X value more than that of the heroes

If the guard is facing right, check for an equal Y value for both the hero and guard, and the guards X value less than that of the heroes

If the guard is facing up, check for an equal X value for both the hero and guard, and the guards Y value more than that of the heroes

If the guard is facing down, check for an equal X value for botht the hero and guard, and the guards Y value less that of the heroes.

Then if any of those succeed, have the guard say "Hey" and there you go.

Edit: Err... They'll be able to see you through walls... Hmm...
Logged

Offline Ganderzz

  • The RPG Maker 2k user
  • Initiate
  • *
  • Posts: 4
(No subject)
« Reply #5 on: August 18, 2005, 04:10:25 PM »
thanx :)
Logged

Offline Linkforce

  • The Original Master of the Mosey
  • Leader
  • *
  • Posts: 2,330
  • i love rpgs
(No subject)
« Reply #6 on: August 18, 2005, 09:06:11 PM »
This helped me too.  Thanks all.
Logged

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

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