ID:1705758
 


But the horizontal movement seems to be tied directly to LEFT and RIGHT+REP. Movement is weird in that respect.
Yeah I'm still working on that a lot lol it seems thats the most important thing about mario heh.
Being able to run horizontally? Nah. That's not really a necessity at all. Who needs that anyway? This ain't Sonic the Hedgehog. :>
You prob were using the arrow keys to run that prob why lol A,D to move Shift to run, spacebar to jump. i disabled the other keys.
updated it some moar... http://puu.sh/cpxQX/ffb6522fc1.png lol gonna add fireballs soon op ;d
In response to Gokussj99
Sometimes, when I'm moving and I press Shift to start running, I just stop moving. If you're using Forum_account's Keyboard library (which you don't really have to, with only 4 buttons), including #define NO_KEY_REPEAT usually fixes this for me.
In response to Kaiochao
Kaiochao wrote:
Sometimes, when I'm moving and I press Shift to start running, I just stop moving. If you're using Forum_account's Keyboard library (which you don't really have to, with only 4 buttons), including #define NO_KEY_REPEAT usually fixes this for me.

that helped a lot.

and the reason im using his library for 4 keys is because i couldnt define shift for running any other way :/
In response to Gokussj99
This doesn't work? Works for me.

try using it.
In response to Gokussj99
I did and it works fine. (of course using a better verb name than run which isn't allowed)
In response to Alex Peterson
Alex Peterson wrote:
I did and it works fine.

Well I did the same thing it wouldn't work regardless I don't see why it matters there is nothing wrong with Forum Account's keyboard library.
In response to Gokussj99
I know, just surprised me that it didn't work for you. His library is fine, I just thought "really?". Was sure it works natively.
As of the 507 beta, you can define 4.0-style macros in a .dms file:
macro
d return ".move 4 1"
d+up return ".move 4 0"
a return ".move 8 1"
a+up return ".move 8 0"
shift return ".run 1"
shift+up return ".run 0"
space+rep return ".jump"


For code like:
mob/player
var
move_dirs[0]

tmp
running = FALSE

verb
move(d as num, on as num)
set name = ".move"
if(on)
move_dirs += d
else
move_dirs -= d

run(on as num)
set name = ".run"
running = on

jump()
set name = ".jump"
// etc.

Tick()
// -1, 0, or 1
var moving = (EAST in move_dirs) - (WEST in move_dirs)

// move some number of pixels in the direction of moving
Kaio, is there any particular reason why you define lists as varname[0]? Is there any difference between that and varname[]?
In response to Mr_Goober
Providing a number N between the square brackets initializes the list with length N.

// these are equivalent (uninitialized lists)
var L[]
var list/L

// these are equivalent (different from above)
var L[0]
var L[] = list()
var L[] = new
var list/L = list()
var list/L = new

// and these too
var L[5]
var L[] = list(null, null, null, null, null) // haha
var L[] = new (5)
var L[] = new /list (5)
var list/L = list(null, null, null, null, null)
var list/L = new (5)
var list/L = new /list (5)
I like the list(null,null,null,null,null) method of creating lists. Seems efficient, lel.
In response to Kaiochao
Kaiochao wrote:
var list/L = list(...)


How is that equivalent to a list of five items? How could that even work?
In response to Multiverse7
Ugh, that one was me eing lazy.
Page: 1 2