Just fuchxin feed me man.
I'm stuck on the round function, I'm examining its parameters & I see 'TILE' (I dunno htf that got there), or what step_x is returning the width of an icon? bound, I'm looking up now.
I know TILE_WIDTH is a variable, atoms are presumably 1 tile & bound calculates the... okay I get it. Now we've got angle, dist and 'ox' (is this like the objects 'thrust' within a tile?) And turf/t (wth is that doing there?) count in 1 to... idg it 'to' isn't in the reference (i can't find it) i = new ore_type() //is that ore_type() a function or just syntax of 'new' ? angle is good distance is good the rest was too complex didn't wanna have a psychotic episode, so I just ignored it hoping you'd elaborate. |
var/cx = round(x*TILE_WIDTH + step_x + bound_x + bound_width)
var/cy = round(y*TILE_HEIGHT + step_y + bound_y + bound_height) and all of this ox = cx + cos(angle) * dist - i.bound_width/2 oy = cy + sin(angle) * dist - i.bound_height/2 t = locate(ox/TILE_WIDTH,oy/TILE_HEIGHT,z) //Move() the item in place. You will need to handle failure or out of map bounds locations. i.Move(t,0,ox%TILE_WIDTH,oy%TILE_WIDTH) |
You should read the DM guide as a starter, and an introduction to computer science.
None of this was particularly complex. This is all 9th-10th grade math. |
That's the gist of it.