Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Cheeze's Eventing Tutorials

Yep yep, I'm starting my Eventing tutorials. If any mods or anyone want to take screen shots of what the events look like, You can. (I would reccomend mods, Because they can edit my post.)

PS: CREDIT ME!!

Compass with Events!
**NOTE** Right when i was going to make this, My gramps Tackled the other comp with rmxp on it. I will check tonight when he gets off to see if everything is right.

Okay,these are the things that you need
  • 4 Variables
  • 4 Pictures(Min.)
Optional stuff
  • 1 Common Event

The First thing you want to do is Create 4 Arrows (UP (^), DOWN(V), LEFT(<-), RIGHT(->)) In Paint, Photoshop, Et Cetera. Upload them into the picture section. Once you've got them Go to the next step.

Secondly, Create an Event that is a parallel process. You can call it "Destination Point." or something like that. After that, you want to create two variables: Location's X and Location's Y. Click the "Character" Button at the end and make it "This event" and "Map X" for Location's X and "Map Y" for Location's Y.

Once you get that it should look something like this
Code:
>Variable[0001]"Location's X" = Event's Map X
>
>Variable[0002]"Location's Y" = Event's Map Y

Okay, Third you want to create your (Common) event that is a parallel Process, Like the first step. After that. Make Two Variables: Hero X and Hero Y. Click the "Character" Button at the end and make it "Player" and "Map X" for Hero X and "Map Y" for Hero Y.

Once you get that it should look something like this:
Code:
>Variable[0001]"Hero X" = Player's Map X
>
>Variable[0002]"Hero Y" = Player's Map Y

Remeber those Arrows you made? We are going to start using those now.
Make four(4) Continential Branches(C-Branch) that look something like this:

Code:
>C-Branch: If "Hero X" > "Location's X"
     >Show picture [1]"Arrow Left"
     >
   >Else
   >Erase Picture [1]
   >
>end
>
>C-Branch: If "Hero Y" > "Location's Y"
     >Show picture[2]"Arrow Up"
     >
   >Else
   >Erase Picture[2]
   >
>end
>
>C-Branch: If "Hero Y" < "Location's Y"
     >Show picture[3]"Arrow Down"
     >
   >Else
   >Erase Picture[3]
   >
>end
>
>C-Branch: If "Hero X" < "Location's X"
     >Show picture[4]"Arrow Right"
     >
   >Else
   >Erase Picture[4]
   >
>end
>

So that whole event should look like this:
Code:
>Variable[0001]"Hero X" = Player's Map X
>Variable[0002]"Hero Y" = Player's Map Y
>C-Branch: If "Hero X" > "Location's X"
     >Show picture [1]"Arrow Left"
     >
   >Else
   >Erase Picture [1]
   >
>end
>
>C-Branch: If "Hero Y" > "Location's Y"
     >Show picture[2]"Arrow Up"
     >
   >Else
   >Erase Picture[2]
   >
>end
>
>C-Branch: If "Hero Y" < "Location's Y"
     >Show picture[3]"Arrow Down"
     >
   >Else
   >Erase Picture[3]
   >
>end
>
>C-Branch: If "Hero X" < "Location's X"
     >Show picture[4]"Arrow Right"
     >
   >Else
   >Erase Picture[4]
   >
>end
>

Right now i cannot provide the Exact placements of the Pictures because i do not remeber them, And I am sure you people are smart enough to get it thru trial and error.
--------------------------------------------------------------
Advanced Compass Event System(ACES)

Okay, You need all of the same things that you needed on the other one, but you need to mod it some and add some more C-Branches and make more pictures: Upper Left, Upper Right, Lower Left, Lower right.
Common Event
Code:
@>Control Variables: [xxxx] "Players Map X" = Player's map X
@>Control Variables: [xxxx] "Players Map Y" = Player's map Y
@>C-branch: [xxxx]"Player's Map X" > [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" > [xxxx] "Destination Point Y"
        @>Show picture:1 "Upper left"
        @>
      @>Else
      @>Erase Picture:1
    @>End
    @>
  @>Else
  @>Erase Picture:1
  @>
@>End
@>C-branch: [xxxx]"Player's Map X" > [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" < [xxxx] "Destination Point Y"
        @>Show picture:2 "Lower Left"
        @>
      @>Else
      @>Erase Picture:2
    @>End
  @>
  @>Else
@>Erase Picture:2
@>
@>End
@>C-branch: [xxxx]"Player's Map X" < [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" > [xxxx] "Destination Point Y"
        @>Show picture:3 ""
        @>
      @>Else
      @>Erase Picture:3
    @>End
  @>
  @>Else
@>Erase Picture:3
@>
@>End
@>C-branch: [xxxx]"Player's Map X" < [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" < [xxxx] "Destination Point Y"
        @>Show picture:4 "Lower right"
        @>
      @>Else
      @>Erase Picture:4
    @>End
  @>
  @>Else
@>Erase Picture:4
@>
@>End
@>C-branch: [xxxx]"Player's Map X" == [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" < [xxxx] "Destination Point Y"
        @>Show picture:5 "up"
        @>
      @>Else
      @>Erase Picture:5
    @>End
  @>
  @>Else
@>Erase Picture:5
@>
@>End
@>C-branch: [xxxx]"Player's Map X" == [xxxx] "Destination Point X"
    @>C-branch: [xxxx]"Player's Map Y" < [xxxx] "Destination Point Y"
        @>Show picture:6 "Down"
        @>
      @>Else
      @>Erase Picture:6
    @>End
  @>
  @>Else
@>Erase Picture:6
@>
@>End
@>C-branch: [xxxx]"Player's Map Y" == [xxxx] "Destination Point Y"
    @>C-branch: [xxxx]"Player's Map X" < [xxxx] "Destination Point X"
        @>Show picture:7 "Right"
        @>
      @>Else
      @>Erase Picture:7
    @>End
  @>
  @>Else
@>Erase Picture:7
@>
@>End
@>C-branch: [xxxx]"Player's Map Y" == [xxxx] "Destination Point Y"
    @>C-branch: [xxxx]"Player's Map X" > [xxxx] "Destination Point X"
        @>Show picture:8 "Left"
        @>
      @>Else
      @>Erase Picture:8
    @>End
  @>
  @>Else
@>Erase Picture:8
@>
@>End
@>
@>[\code]
--------------------------------------------------------------
[size=150][b]Designing your own house with events![/b][/size]

Okay, This one is still alittle buggy but I will go ahead and release it.(Eh, Here in a little..Grandpa always gets on the damned comp.)
--------------------------------------------------------------
If you want any Systems that you would think are useful that havent been made yet Just tell me. I am sure that I can make them. I will add some more tuts in this Topic sooner or later. Watch out for my iABS too, 'Cause I might just realese it early!
 
Problem: What if both event x and y are greater or less than the player's coordinates. Wudn't there be a bit of a conflict in the picture shown?
 
Uh...No...The only way that No pictures would come up would be if you are on top of the location that you set as your destination. If your X is = to the Event's X, it wouldn't show a up or down arrow, only left or right.

Please test it out before just reading it and saying there is a bug. I've tested it on the biggest map you can get and it never messed up, And I  had the event set at a random spot each time( With variables and set event location).
 
I believe by picture conflict he may well be referring to the fact that if the compass should be pointing North East to suggest you need to travel up and right, 2 arrows would be displayed, the up arrow and the right arrow.  An actual compass only has the single arrow pointing diagonally up and to the right.

If you were 1 tile below the Y target, but 60 tiles left of the X target, the compass would not accommodate this, it would merely show an up arrow and a right arrow, where the character actually doesn't need yo travel up any more.

Admittedly I haven't tried it either but is that not the case?
 
No, the arrows point to the target's location, so it would still have an up arrow. The arrows only disappear when you are ontop of the location, not next to.
 
Yeah, I haven't gotten the time to Do that, Calibre. Don't have anything else to do so i might aswell as do to that right now.
 
Fair enough Cheeze, it just is a big flaw in the system particularly on largely square maps.

Tensuke, I don't think you understood my point.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top