• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  
Sign in to follow this  
Followers 0
Tsukihime

Compass move commands

1 post in this topic

Compass move commands

-Tsukihime

 

Set move commands based on the current "north" direction.

The north direction can be set in the move route using a script call.

 

For example, this allows your move routes to be based on the the player's current direction without writing cases for each direction.

 

Usage

 

So for example, suppose the following cases

 

North direction = up
  move_north = up
  move_south = down

 

North direction = left
  move_north = left
  move_south = right

 

The following methods are available

 

   set_north(direction)
    -takes a numerical direction (2, 4, 6, 8) to specify the north dir
    -2 = down, 4 = left, 6 = right, 8 = up

  move_north(count)
  move_south(count)
  move_west(count)
  move_east(count)
  turn_north
  turn_west
  turn_east
  turn_south

 

Where `count` is the number of times you want to move in that direction

 

Download

 

Script: http://db.tt/oxBX6LjG

 

Note

 

These methods have been implemented in FP: Move Routes as well as Event Wrapper under the same method names.

 

I am also looking for a way to force the entire move route to be direction-relative rather than absolute, but it is not as straightforward as hardcoding some commands. Naturally, setting a flag would be a more useful approach because you could just add an extra script call to your existing move routes to make them direction-aware rather. And I wouldn't have to write direction-relative methods for every command.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.