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 »
  • reverse caterpillar system.
« previous next »
  • Print
Pages: [1]

Author Topic: reverse caterpillar system.  (Read 2077 times)

Offline Rson_DeLarge

  • is apparantly
  • Associate
  • *
  • Posts: 111
  • is not an
reverse caterpillar system.
« on: May 04, 2009, 05:43:57 PM »
ok, so a while back somebody was asking about programing "eyes" for guards in a part of the game where the hero's trying to escape. I suggested they make the events that touch the hero like a caterpillar system that reassembles in front of the monster instead of behind it. much like in zelda games when trying to sneak past soldiers and such

So last night I tried to make such thing to represent enemy encounters, so in theory there would be a bunch of enemies on the map and when they turn and see you (collision with hero) it's a normal enemy encounter, and when you walk up to them and press the action key before they see you, it's a preemptive attack.

I was going about doing this using a random variable between 1-4 and had the events move accordingly (1=down, 2=left etc..)
the thing is when I get to the second event for 'eyes' for some reason it doesn't mach up right when the other two move around. it's just constantly on the square beneath the first 'eyes' event.
I tried changing the layer, changing the frequency, adjusting the path of the second eye event, but it still has the same result.
and just forget about running into walls, then it just gets waaaay screwed up.





so, if anyone knows of a better or perhaps easier way to program eyes and the like, could you help me out?



I was thinking maybe 'set variableA to: memorize map location' and 'if variableA is xxx' but that would take a MASSIVE amount of programing.
Logged
Quote from: luvjay0918 on April 30, 2009, 07:48:15 AM
The games were from that themes was good and they can make a enjoyment to the player..

Offline Rahl

  • Lord Of Gamedwellers
  • Leader
  • *
  • Posts: 2,356
Re: reverse caterpillar system.
« Reply #1 on: May 04, 2009, 07:26:02 PM »
Set variables equal to your hero position on map, then add + whatever the line of sight you want it to be is to its x and y. Then move event to those coordinates. After that you would have to set coordinates for every guard and make event branches saying is event x&y then your event to kick them out of do whatever you want to them.

But personally I would just create custom paths for the guards and set events with corresponding cutom paths and make it so when the hero touches them then you "kick out" event happens. Thats just me though.
Logged



Offline Rson_DeLarge

  • is apparantly
  • Associate
  • *
  • Posts: 111
  • is not an
Re: reverse caterpillar system.
« Reply #2 on: May 05, 2009, 02:20:39 AM »
ok, I figured out something similar to that.
I assigned variables to each monster/ the hero, then I had a random number generator that also dictated what direction the monster moves.

the rest is pretty hard to explain even if I show you the code..

but basically I found a way to plug in a couple numbers to control the speed of the monster/guard and range of sight.

I'm quite proud actually.

I can have as many of these as I want on one map, and when you walk away from a map after defeating monsters and come back those monsters are still there. I've decided to do this instead of random encounters because it still requires the player to fight to advance but does it in a way that ties the monster in with the map/environment.

I remember this article on gaming world about villains and how monsters in RPGs are rarely actually given a motive.
yay, now mine doo!! that is that you have to invade their territory to advance and they attack.
I will be working more on movement patterns and motion type to accomplish this further.


so, I should probably do a Tut. on this one of these days. it really is a cool system.

Logged
Quote from: luvjay0918 on April 30, 2009, 07:48:15 AM
The games were from that themes was good and they can make a enjoyment to the player..

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

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