edited December 2013 in ORK Support
Hey, awesome framework! :D

I want to use a system in that a player's position is always fixed and they move through 'rooms' via WASD (ie. North, West, South, East). Like a 3D MUD so to speak.

The only idea I have so far is to use the Areas system and a lot of events to do it. Though there does not seem to be a simple way of connecting a ton of areas together in a scene.

In my dream scenario I would be able to visually connect areas together (similar to the event system for example) and attach a trigger script to each area that would hook up navigating between them. The second dream would be to hook up a maze or random room generator to it all but I digress!

I thought I would ask if any of you had ideas on which way to go with this or if maybe there's a clever way of doing this within the confines of the framework.

Thanks
Post edited by gamingislove on
  • edited December 2013
    I've come to realize this is better described as grid based movement. Each room/plot of land/whatever denotes a node on a grid.
    Post edited by sharper on
  • edited December 2013
    Actually you can do this with one event. If each node is a new scene, use a variable in the event system to keep track of your current location, then if the user presses WASD buttons, it adds or subtracts a digit from the current location variable and loads the appropriate scene. Like your current location is 37, up will ad ten (47) and down will subtract ten (27), where left would add one (38) and right would subtract one (36), thus using the first digit as your vertical location and your second digit as your horizontal location. Then have a scene change event load the scene based on the variable, thus it would load scene 38 if you went left.

    If you wanted to have it all in one scene, you could position spawn points and do the same process. If you step right, you would teleport to spawn point 36.

    If you want the character to walk to the location, rather than spawn points, set them all up as waypoints, then use a move event to make the character walk to the right waypoint using the same method as above.

    Oh, and you should also have check steps for boundaries. Otherwise, it would try to load waypoints, scenes, or spawn points that don't exist and could crash your game.
    Post edited by Ntelliware on
  • Thanks! I'll give it a shot. I just wasn't sure how to make a player 'aware' of exits to other rooms that may be around them at any given time. This seems like something I will have to do maybe independently of the framework.
  • Easy way to make the player aware of objects is to use some sort of prefab where the object is, like a big green floating arrow or something. You could also use spot lights with light cookies in the shape of an arrow to project the arrow on the floor, possibly even writing a simple script that would make the lights get brighter as the user gets closer to them. Or, you could always just use a map, lol.
  • Basically you can use any type of player control, so if you need a special control style you can script one yourself or use one from the asset store (or other sources :D).

    The controls are set up in Base/Control > Game Controls. Select control type None and add the name of your control behaviour (script). This way, ORK will know which component to enable/disable when needed.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.