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.

WORKING MECHS, (A.K.A. ROBOTS!) Warning Image Heavy!

prepe

Member

===================================
WORKING GEARS, (A.K.A. ROBOTS!), PART ONE!
===================================

Well this is my first tut, and I hope It helps other people out! It will be a two part tutorial, or three, I haven't decided. Special thanks to Knight Blade, as It was that game that Thought me about events, and variable transfers, and the way the A.G. (Armed Gear) works! That is what I'm basing this tut off of! I apologize if this has been done before. I did a search and found nothing like this. I also apologize if this is in the wrong spot as I was not shore!

==========
Screen Shots
==========

=====
Q. & A.
=====
Q. What dose it do?
A. Well it lets you get in and out of robots, (Gears!)

Q. what do I need?
A. Well a few things actually. Mostly you need a basic under standing of variables, switches, and events. We will get to those soon, and if you want, Maybe even a HUD pic that says what key to press to get out of the gear, and what key to press to dash, and Enter the menu, ect...

Q. Well you be posting a demo?
A. No this is a tut hands on is the best way to learn not copy and past!
I have attached a text document of this tut, so you can store it on our computer for later usage!

Q. What if I get an error ,and can't figure it out?
A. Tell me what it is, and I will help?

-Note-
This is a little bit more of an advanced tutorial, and not really a beginners tutorial, but if you are a beginner, and you absolutely must have this, Just post here, and tell me what you don't get, and I will gladly help. OK, Lets get started!

===========
THE TUTORIAL!
===========
=
I
=
Well lets get started. First you will need a two variables!
You will need,
Code:
Player X,
Player Y
We will set those in that order in The Variable screen.
So it will look like,
Code:
0001: Player X,
0002: Player Y,
http://img229.imageshack.us/img229/7522/variablessg5.png[/img]
You can change there places if you want, but for the tut I will be using those OK! Now you need a switch. You need,
Code:
Gear In,
It should look like this,
Code:
0001: Gear In,
http://img84.imageshack.us/img84/3062/switchesgs8.png[/img]
You can Chang those to, but as I said I will be using those for the tut.
Lets move on!

==
II
==
Now that you have that done, Lets set up the event of the gear. You will need to place an event on the map. You will need two pages on this event. On the fist page, chose the graphic you want, and make it,
Code:
Movement type - Fixed
Movement Speed - 3
Movement frequency - 3
Trigger - Push Button
Options - Direction fix
http://img2.freeimagehosting.net/uploads/c105d4e0f1.jpg[/img]
So Basile leave it normal. Just check the Direction Fix box in the options area. Now in page two set it like this, No graphic, but make it,
Code:
Activated by Switch 001: Gear In
Movement type - Fixed
Movement Speed - 3
Movement frequency - 3
Trigger - Parallel process
Options - Leave normal
http://img2.freeimagehosting.net/uploads/7779c6c49c.jpg[/img]
Yeah, We made it through the beginning!

==
III
==
Now comes the little bit harder stuff. In the event, on page one, add a message saying board gear?, or what ever you want! then put a show choice below that says Yes, and No or whatever you want it to say but make it Disallow Cancel so you have to choose ether yes, or no So, so far you should have this,
Code:
@>Text: Board Gear?
@>Show Choices: Yes, No
  : When [Yes]
   @>
  : When [No]
   @>
  : Branch End
@>
http://img2.freeimagehosting.net/uploads/75ebf900e5.jpg[/img]
Now in side of the Yes command You need to put a move route, so click on the move route, and add,
Code:
Through On
Move Up
Face Down
Through Off
http://img2.freeimagehosting.net/uploads/6431011b72.jpg[/img]
Now click OK, and below that you need to add the wait till move's completion, Then add a change transparent flag, and set it to transparent. Now after that you need to add a screen flash of white,
With a time of 10 frames. Then Add a sound effect I use 009-system09, (It makes for a nice sound), and set the volume to whatever you want, and set the pitch to 90, (Not 140 but 90), Then you want to change your players graphic to the graphic of the bot, So add a change player graphic, and make it the same graphic as your bot. Now turn on switch 0001: Gear In, and add another Transparent flag, but make it back to normal. Then if you don't want to have encounters during this time, add a change encounter:, and set it to Disable. Now if you want to add a pick of a HUD, Just add that right after, and make the x, and y, to where ever you want the pic to be on screen. So, After all that you should have this, Ignore the encounter disable, and the picture show if you don't want to use those! Here it is,
Code:
@>Text: Board Gear?
@>Show Choices: Yes, No
  : When [Yes]
   @>Set Move Route: Player
     :                       : $>Through On
     :                       : $>Move Up
     :                       : $>Face Down
     :                       : $>Through Off
   @>Wait for Move's Completion
   @>Change Transparent Flag: Transparency
   @>Screen Flash: (255,255,255,255), @10
   @>Play SE: '009-System09', 100, 90
   @>Change Actor Graphic: [Player], Bot,0, , 0
   @>Control Switches: [0001: Gear In] = ON
   @>Change Transparent Flag: Normal
   @>Change Encounter: Disable
   @>Show Picture: 50, 'HUD', Upper Left (0, 387), (100%, 100%), 150 Normal
   @>
  : When [No]
   @>
  : Branch End
@>
http://img2.freeimagehosting.net/uploads/7058f6dbf9.jpg[/img]
Now run a test play, and now you should be able to get in the gear!
Well that wasn't to bad was it? Now the second part, Lets get out of the Gear!

==
IV
==
OK, Now Open the same event and go to page two. In page two you need to make shour it is a parallel Process page and add a condition branch of Key Press Z, then in side that branch add a message saying Leave Gear?, and again make it yes and no and set it to no cancel.
Now that one should look like this,
Code:
@>Conditional Branch: The Z button is being pressed
   @>Text: Leave Gear?
   @>Show Choices: Yes, No
     : When [Yes]
      @>
     : When [No]
      @>
     : Branch End
   @>
 :
@>
http://img2.freeimagehosting.net/uploads/242f2cbb46.jpg[/img]
Now In side the Yes command add two controlled variables, they are the,
Code:
0001: Player X,
0002: Player Y
http://img2.freeimagehosting.net/uploads/15ab33555a.jpg[/img]
And make them set to the players X and Y position. so you should now have this,
Code:
@>Conditional Branch: The Z button is being pressed
   @>Text: Leave Gear?
   @>Show Choices: Yes, No
     : When [Yes]
      @>Control Variables: [0001: Player X] = Player's Map X
      @>Control Variables: [0002: Player Y] = Player's Map Y
      @>
     : When [No]
      @>
     : Branch End
   @>
 :
@>
http://img2.freeimagehosting.net/uploads/fdbe818f42.jpg[/img]
Now then, We need to move the event to your location, So click on set event location, and make it for this event, and click on the appoint with variables, and set the map x to 0001: Player X, and set the map y to 0002: Player Y, and make it face down, Then click OK, Then add a sound effect. Again I used the 009-System09, but this time I set the pitch to 150. OK, Now you need to add a move route, so open the move route, and set it to this event, and make add in the route,
Code:
Direction FIX
Switch OFF: 0001
http://img2.freeimagehosting.net/uploads/1ce26be277.jpg[/img]
Then click OK, and add a wait till move's compilation. Now we need to change the players graphic back, so click on Change Actor Graphic:, and set his graphic back to normal, and give him his battler back to. Now you need another move route so again open it up and set it to player this time and add,
Code:
Move Down
http://img2.freeimagehosting.net/uploads/be9abfcc63.jpg[/img]
Now click OK, and add another wait till move's compilation. Now we need to erase the HUD, If you used it, and re-enable the encounters if you turned them off. So, click Change encounter, and set it to enable, Then click on the erase picture, and set it to 50, so it will eras the HUD. Now you are done. Page two should now look like this,
Code:
@>Conditional Branch: The Z button is being pressed
   @>Text: Leave Gear?
   @>Show Choices: Yes, No
     : When [Yes]
      @>Control Variables: [0001: Player X] = Player's Map X
      @>Control Variables: [0002: Player Y] = Player's Map Y
      @>Set Event Location: This event, Variable, [0001][0002], Down
      @>Play SE: '009-System09', 100, 90
      @>Set Move Route: This Event
           :                       : $>Direction FIX
           :                       : $>Switch OFF: 0001
      @>Wait for Move's Completion
      @>Change Actor Graphic: [Player], Player Graphic,0, Player Battler, 0
      @>Set Move Route: Player
           :                       : $>Move Down
      @>Wait for Move's Completion
      @>Change Encounter: Disable
      @>Erase Picture: 50
      @>
     : When [No]
      @>
     : Branch End
   @>
 :
@>
http://img2.freeimagehosting.net/uploads/c7c9e97be6.jpg[/img]
Now save it, and test play it. Now you should be able to get in, and press D to get out of your Gear. Remember to make page two activated by Switch 0001, so it will erase the graphic of the bot while you are in it, and put it back while you are not in it, and don't for get to set page two to Parallel Process! That's all for now. I will put up A part two of this tut later on, but not now, as my fingers hurt. In part two we will be adding dash, and move sound effects to this system, so stay toned, and don't delete  this from your computer, as we will be editing this system. OK, I hope I did not miss anything, Thanks, and C&C please!

Here is the attachment!
http://files.filefront.com/Workin+Gears+Event+Tut+FPrtf/;9673462;/fileinfo.html
Hope that helps someone!

~prepe~
 

___

Sponsor

Pretty cool!  I was thinking, this probably won't save the location that you left your mech after you leave the map, so you might want to create a set of variables, Gear X, Gear Y, Gear MapID.  Save those with appropriate numbers after the player gets out, and on a third page check if the current map's ID = Gear MapID, and if so set the event's x/y coords, then put that.  Actually it may be best to make these in common events so if you have to do any editing you can do it universally, since you're going to need this event on any map where a mech can go.

This event system should work for any vehicle in any game though, in a nice and simple fashion. :D
 

prepe

Member

Thanks! Yeah I will be adding that to Part 3, but In three I will probably be using Dublexes Memorized Location script to memorize the robots locashon, or maybe Ill do both depends on what people want the most, but first I'm going to do part 2 'dash, and move sound effects', well if everyone wants more that is. Thanks again for the comment.


~prepe~
 
I'd suggest renaming the title to "mech" rather than "gear", I think more people will know what you're talking about and will be more attracted to the tutorial.

Just a suggestion, I personally thought this was about GEAR gears, like cogs and stuff.
 

prepe

Member

Done, Thanks! Sorry I had Xenogears in my mind when I was making it! Cogs hmm...? Now that's an idea for another tutorial, lol. :smile: j/k
 

prepe

Member

yes there is, and yes it will! I'm working on part two, right know, so I might just add that to part two! I'm not shore Tho!

~prepe~
 

prepe

Member

Sorry no demos! It is a tutorial, to help people learn. If you are having Problems post here, and I will help you, but that is all, Sorry!

~prepe~
 

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