Jump to content

twiceincarnate

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

4

About twiceincarnate

  • Rank
    Newbie
  1. twiceincarnate

    Long time lurker - finally saying hello

    Thanks!
  2. Auto-walk This is my first attempt at a tutorial, have a few more planned but please tell me how I could improve it or where I can clarify. Please find attached a basic demo of the Auto-walk demonstrating the features and showing the eventing in detail. autowalk demo (dropbox link) Basic premise - Using eventing a some knowledge of script calls (no scripts needed) you can have a common event that allows for the player characters to follow a road or a path 1 tile wide in any shape or path that you have drawn it - at the press of a button. This was inspired by the Witcher 3 where, if you hold down a button when riding your horse it will automatically follow the road. I have been making big maps - really big, and on these maps I've been drawing in roads, but it gets a little tiresome to explore these maps by moving around holding a direction. I'd been looking for a script that could do something like this but with no luck. Luckily, with a bit of rooting around and thinking me and my bro managed to figure out something that works for us, and might work for you. Example of a map with road drawn on - How it works - At the press of a button your character will follow a path, stopping when you press a directional button or at the end of the road or at a crossroads. you can draw any kind of road 1 tile wide on a map of any size and it should work. The only script I've used is yanfly's button to common event, but it is not necessary to get auto walk working, only for convince. you do not need the script but it does make auto-walk simpler. link to script What you'll need - 1. You will need to create 3 blank events per map, and they will all need to have the same id - the simplest way is to have them be event 1, event 2, and event 3. They should be blank and have the through box ticked. 2. You will need 1 common event slot - everything will be handled here. 3. For the terrain that you want the player to autowalk on you will need to go to the Database, Tilesets, Terrain Tags and modify the number of the terrain to something that you aren't using for any other terrain. I've set roads to terrain tag 5 and am not using it for any other terrain other then roads. Important to note I've discovered that at a normal move speed the auto-walk does not seem to work all that well - I've found that the max move speed that it works at is about 3.6. you can use a simple script call to alter the move speed - $game_player.instance_eval("@move_speed = 3.6") I've made it so the common event in the demo changes the players move speed while auto-walking, but this is not pictured in my screen shot below. Auto-walk Common Event In the spoiler you can see the whole common event that I'm using - there are a few bits that may be redundant but it more or less works (lol) The initial conditional branch is to make sure that the event does not proceed if the player is not on a road - this prevents interference on maps that you do not want the autowalk to function on. you can similarly use a switch or variable or map id for the condition. Below that starts the loop. in the demo I've included a script call to change the players speed to 3.6 - the max speed I've found that the auto walk works at properly - any faster and is doesn't seem to turn correctly. you might be able to figure out how to get it working better than me xD At the start of the loop you'll see a conditional branch by player direction - this then uses a script call to place events 1,2,3 respectively in front, and to either side of the player. this needs to be repeated for each event and for each possible direction the player can face. Just below there is a nested conditional branch that reads the terrain tags of events 2 and 3 and calls a move route for the player to wait for one frame. this makes the player come to a halt at crossroads or where multiple roads intersect. Below that is the conditional branch reading the terrain tags of event 1 - the event in front of the player. this simply reads that if the terrain tag is 5 (a road terrain) the player preforms 1 step forward, skipping if unable to move. In the conditional branch, as well as in the conditional branches that follow you'll see I've included nested conditional branches that in the case of any direction being pressed the loop will break - this is so at any point during the auto-walk you can resume control of the player character. In this conditional branch there is a jump to label: loop, taking you back to the label at the top of the common event at the start of the loop - this is necessary so that during the auto-walk the player movement prefers going forward to turning at junctions. The next two conditional branches are identical, reading the terrain tags of events 2 and 3 - in the case of event 2 it would turn the player character right by 90 degrees and step forward, in the case of event 3 left by 90 degrees and a step. You can see that I've included a wait for 5 frames after each - that is so the move has time to execute / be registered before the event loops. Nested in the conditional branches all the way to the bottom are repeated the conditional branch to break the loop by direction pressed - I'm not sure if all of them are entirely necessary, but I've included them because it was working for me xD. At the bottom, after the look (not pictured) is a script call to return movement to normal speed. Finally - The common event in the demo attached differs slightly from whats pictured, and includes the yanfly button to common event script. you should be able to see it working. Well, thats about it I reckon. This is the first tutorial I've tried my hand out, not sure how helpful it might be - I was just excited at having figured out how to do something like this and thought to share it with youse all. I hope you can find something to use in whatever project you're working on here, and in the future I might try my hand at a couple of other tuts to do with mapping or variable terrain speed. Thanks for reading! autowalk demo (dropbox link)
  3. twiceincarnate

    Long time lurker - finally saying hello

    lol. waaaay too many - I'm working on cutting a hell of a lot of em out, but currently my script list for doslands has maybe 150+ scripts, perhaps 1/3 disabled - as you can see - the scroll bar goes way down past materials lol. A lot of that is taken up by gtbs though. best scripts that I can't live with out have to be Rycochet - Disable Scripts Zeus81 - Fullscreen ++ JV - Skip Title there is probably, well, most likely a hell of a lot of instability as a result of my reckless script adding, but so far I ain't been getting many crashes . . . yet.
  4. twiceincarnate

    Long time lurker - finally saying hello

    Rikifive, Trainer17, - thanks! 3 years - ikr? I'm a degenerate lurker, heh. gonna go lurk on the scripting threads and see if I can find something to add to my bloated script list . . .
  5. Yo, hello, greetings from distant lands. I'm a long time lurker, well, just in general - been using rpg maker since forever (cut my teeth with rmk2000 and have been hooked ever since). My current active project I've been working on on and off for maybe more than a year now - I'm a script junkie but have been spending most of my time mapping of late - still very early in alpha and am working on the mechanics and mapping for Doslands (working title) that is inspired by mount and blade, morrowind, and Darklands and . . . uh, well, I'm not all that good at talking about myself . . . here, have a map shot as a distraction! This is a 1/10 mapshot - the full size is a little too big. well anyways, I'm pretty good a eventing, writing, and looking at scripts trying to figure out how they work. Hope this is alright for an introduction. Nice to meet you all! twiceincarnate
×
Top ArrowTop Arrow Highlighted