ID:2250927
 

Code:
        tech_elf
//step_size = 3//4
move_speed = 3
move_slide = 1
icon = 'retroZ/Characters64.dmi'
icon_state="tech elf"
pixel_x = -24//25//26//32
pixel_y = -16//32
bound_height=30//32
bound_width=16

            density
icon='area1.dmi'
density=1
allow_slide=1
var
terrain=null

Enter(mob/player/p)
if(terrain)
if(terrain in p.terrains)
return 1
else
return 0
else
..()



Hey everyone!
I recently updated a project from using Ter13's edge slide lib to his movelib. I got everything working pretty well except for edge sliding as well as diagonal movement.

I tried importing similar macros from the old library and attaching the keys to things like .north rather than KEY1 since that's not used in the new lib. This didn't change anything though.

My current thought is that I might need to assign macros to keybinds that are in someway associated with the following:
Utility:

DIR_NORTHEAST defaults to 16.
DIR_SOUTHEAST defaults to 32.
DIR_SOUTHWEST defaults to 64.
DIR_NORTHWEST defaults to 128.
DIR_VERTICAL defaults to NORTH|SOUTH (3)
DIR_HORIZONTAL defaults to EAST|WEST (12)


Although I don't really know! If anyone has gotten edge sliding to work with ter13's movelib, help would be greatly appreciated. Cheers.

EDIT: I tried directly pressing a northeast key, it worked. I cannot however get a up+right key to make me go northeast and still can't edgeslide whatsoever.

Original Edge Slide:
http://www.byond.com/developer/Ter13/EdgeSlideDemo

Edge Slide Documentation:
http://www.byond.com/forum/?post=1467754&hl=edge%20slide

New Movelib:
http://www.byond.com/forum/Ter13/MoveLib

Movelib Documentation:
http://www.byond.com/forum/?post=2199604
I'm considering deprecating Movelib. It didn't pan out to be as good a solution as I had thought it would be.

Also, EdgeSlide is already severely outdated.

My current replacements don't really exist though.
Also, if you want diagonal keys and aren't making a turn-based rogulike, my advice is simple: Don't.

WASD for righties and arrow keys for lefties is the de-facto industry standard. Stay away from anything else.
I'm actually just looking to incorporate the edge slide mechanic; I appreciate a decent pac man style movement system.

Diagonal keys were never a goal though, the diagonal movement achieved from the library though was handy to be able to enable/disable edge sliding and trading off precise movement/diagonal movement for speed or flying or whatever.

Anyway, I'm pretty much boned unless you pickup on the project then again? haha.

The original edge slide was performing pretty well honestly, the only issue I experienced was because characters/map objects in this project are in all shapes and sizes. Some edge sliding characters would get stuck on corners they're turning into.
Sorry, I just got back to this. I wasn't in a place where I could give this any thought when I answered back at the end of may.

Okay, so MoveLib actually implements edge sliding already. Implementing 4-dir/8-dir diagonal movement handler works in MoveLib just like it would anywhere else.

MoveLib does not modify movement controls in any way. It only modifies collision hooks. I'm going to be spending some time documenting ControlLib in a few minutes, so keep an eye out for that.

MoveLib will see ongoing support with MoveLib related issues, but this isn't a MoveLib problem. It's a general question, and you probably didn't get a very good answer under the assumption that MoveLib deals with controls.

http://www.byond.com/forum/?post=2160371

This whole thread will poke you in a good direction of where my mind is at for the moment until I can get everything I've been doing in private the last few months out on a public thread.