Gw Temp

Menu

Tutorial - 'Realistic Enemy Vision' by Nintendo

An item about RPGMaker 2000 posted on

Blurb

Make gaurds a bit smarter in your games, and allow them to see more then the first tile in front of them!

Body

Hello! It’s the extraordinary Nintendo! I am about to show you what I found out and how you can make your stealth game better (drum rolls)…

With advanced enemy vision! Instead of using that crappy method where the guards can see only one tile in front of them, now they can see as far or as short as you would like them to (I recommend five-tile-vision).
And best of all with this exclusive tutorial I will show you how it is done.

Time: I have no idea.
Fun making it: Absolutely… NONE!
Fun using it : Absolutely… A LOT!

Well… It is very hard and not for n00bs. N00BS GET THE @#$% OUT OF HERE! Just kidding. N00bs may stay as long as they don’t break there computer trying to figure this out so I think we should begin.

First things first… make a new game and create a map (I recommend it small if it is not for your game and you are trying it out) and make the player start position.

Uhhh…

Next… Make a guard (I recommend a pirate) somewhere on the map.
Have the pirate be facing down, call it ‘guard‘, movement type any, and triggered by collision with hero. Just have the event commands game over or minus some kind of variable to health, depending on your game. You can actually have it do whatever but remember this is only when you hit the pirate.
For this example, I am making the guard see up to five tiles in front of him. Right in front of his face make an event on collision with hero, no graphics and below hero. Have the Event Commands whatever you want when you walk in front of his face. Call this event GuardVisA1. Copy in paste it four times, each going down a straight line below his face naming each one
GuardVisA2, GuardVisA3, and so on. Now to the right of him, paste it four more time in a line to the right. Name each one GuardVisB1, GuardVisB2, and so on.
Now for the harder part.
Make a parallel process below hero somewhere on the map. You need an extra, similar event with the changed variables (I.E. Guard1X = Guard2X) for every guard on your map.
Variables needed:

Guard1X
Guard1Y
(You need Guard variables for each guard you have)
HeroX
HeroY

Switches needed:
NONE

Let’s get started:
(I use RM2K3 so the code might differ but you’ll get it anyway) Branch = Fork OPTN

<>Variable Oper: [????: HeroX] Set, Hero X Coord
<>Variable Oper: [????: HeroY] Set, Hero Y Coord
<>Variable Oper: [????: Guard1X] Set, guard X Coord
<>Variable Oper: [????: Guard1Y] Set, guard Y Coord
<>Branch: guard Up Facing
<>Variable Oper: [GuardY] + 1]
<>Change Event Location: GuardVisA1, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] + 1]
<>Change Event Location: GuardVisA2, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] + 1]
<>Change Event Location: GuardVisA3, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] + 1]
<>Change Event Location: GuardVisA4, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Branch: Var [????: HeroX] is V[????] (That’s GuardX) Equal
<>Branch: Var [????: HeroY] is V[????] (That’s GuardY) Equal
<> (Whatever you want to happen when seen)
<>
: End
<>
: End
<>
:End
<>Branch: guard Rightng
<>Variable Oper: [GuardX + 1]
<>Change Event Location: GuardVisA1, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX + 1]
<>Change Event Location: GuardVisA2, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX + 1]
<>Change Event Location: GuardVisA3, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX + 1]
<>Change Event Location: GuardVisA4, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Branch: Var [????: HeroX] is V[????] (That’s GuardX) Equal
<>Branch: Var [????: HeroY] is V[????] (That’s GuardY) Equal
<> (Whatever you want to happen when seen)
<>
: End
<>
: End
<>
:End
<>Branch: guard Doenng
<>Variable Oper: [GuardY] -1
<>Change Event Location: GuardVisB1, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] -1
<>Change Event Location: GuardVisB2, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] -1
<>Change Event Location: GuardVisB3, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardY] -1
<>Change Event Location: GuardVisB4, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Branch: Var [????: HeroX] is V[????] (That’s GuardX) Equal
<>Branch: Var [????: HeroY] is V[????] (That’s GuardY) Equal
<> (Whatever you want to happen when seen)
<>
: End
<>
: End
<>
:End
<>Branch: guard Left Facing
<>Variable Oper: [GuardX] -1
<>Change Event Location: GuardVisA1, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX] -1
<>Change Event Location: GuardVisA2, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX] -1
<>Change Event Location: GuardVisA3, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Variable Oper: [GuardX] -1
<>Change Event Location: GuardVisA4, (V[????], V[????]) (Use the variables GuardX and GuardY)
<>Branch: Var [????: HeroX] is V[????] (That’s GuardX) Equal
<>Branch: Var [????: HeroY] is V[????] (That’s GuardY) Equal
<> (Whatever you want to happen when seen)
<>
: End
<>
: End
<>
:End

Yay. You just finished my long boring tutorial. I hope it helped you out.

Bye! Bye!