ID:159680
 
Basically what I want to do is:
- Mob moves 6 tiles in the direction they're facing(dir variable)
- Mob stops if it bumps into an object, executes a proc on all atoms(excluding areas) around it
- When mob is moving, fading trails of the mob's icon(including overlays) get made, which slowly fade(gaining alpha transparency, I guess)

Can anyone make this for me? I suck at manipulating icons(I'd prefer if the method used didn't make much lag, if possible).

Thanks in advance!
D'you mean that, when they take a step, they automatically move six tiles?
In response to Popisfizzy
More of a verb or proc that will just move them 6 tiles forward, and do whatever else I listed.
In response to ANiChowy
Does they jump six tiles automatically, or is it tile-by-tile, with a pause?
In response to Popisfizzy
Tile-by-tile, but with the look of it being "instant". IE: Pretty fast, perhaps moving one then skipping one.
I find it easier to keep normal movement, but then add in a "flash stepping" feature.
In response to ANiChowy
turf/proc/IsDense()
if(density)
return 1

for(var/atom/a in contents)
if(a.density)
return 1

return 0

mob
FadeStep()
var
list/steps[0] //List of tiles to step on.
turf/step //The next possible tile to step on.
for(var/a = 1, a <= 6, a ++)
if(!step)
//If step isn't set, then this is the first
//iterations, to get the tile direct one in
//front of the mob.
step = get_step(src, dir)
else
//Get the tile ahead of the current step, in
//the mob's direction.
step = get_step(step, dir)

if(!step || step.IsDense())
//If the current tile is dense, or there is
//no tile (likely at the edge of the map),
//then halt.
break
else
//Otherwise, add them to the steps list.
steps += step

if(steps.len)
//If steps has a length, that means they can
//move to a tile.
loc = steps[steps.len]

spawn()
for(var/a in steps)
sleep(1) //Wait one tick, to give a cool-
//looking stepping effect.
new/obj/fade_obj(a, src)

obj/fade_obj
density = 0

var
fade_time
fade_steps
fade_alpha

New(atom/a, atom/ref, t = 1, s = 13, a = "14")
loc = a
icon = GenerateIcon(ref)

//fade_time is the time to wait between each step.
//fade_steps are the total amount of steps to take
// before deleting the objects.
//fade_alpha is the amount of alpha to blend to the
// icon each step.
fade_time = fade
fade_steps = s
fade_alpha = a

spawn()
Fade()

proc
GenerateIcon(atom/ref)
var/icon/i = new

/*
I don't currently have access to a compiler, so
I can't figure out what to do here. When I get
home I'll do it, unless someone has already
filled this in.

What this will do is take a ref (any type of
/atom) and generate a new icon based on that
atom and it's underlays, icon, and overlays, and
then return the newly-generated icon.
*/


return i

Fade()
for(var/a = 1, a <= fade_step, a ++)
sleep(fade_time)

//I think I'm wrong on this, so someone had
//better check it. If no one has, I will
//when I get home.
icon = icon.Blend("#000000[fade_alpha]", ICON_OR)

del src