Hi, guys. I need some help.
I'm trying to make a generic projectile throw. But it on the step proc, it seems to ignore the last parameter. The object moves on a step_size scale and not by the pixel.
This is the proc:
verb
Throw_Magic_Straight()
set category = "Combat"
var/obj/skill/projectile/generic_projectile/bullet = new()
bullet.dir = src.dir
var/life_time = 10
bullet.loc = src.loc
bullet.dir = src.dir
while(life_time>=0)
sleep(1)
if(!step(bullet, bullet.dir, 1))//3rd parameter not working properly
del(bullet)
return 1 //hit
life_time--
del(bullet)
return 0 //didnt hit
I tried to set the object step_size to 1 on this moment. It works for the projectile, but I don't know who the heck it breaks the Move() from all mobs. It changes from GLIDING to JUMPING. It doesn't change the Mob stepsize, only its animation. I don't get this interaction.
My last resort is to make manually a proc that moves the object pixel by pixel and checking colision through pixel_x, pixel_y and bound manipulation. I didn't want to do this. I couldn't make it work with any of the movement procs, they ignore the pixel parameter.
Here is the video from the Verb without breaking the animation, ignoring the "step()" last parameter:
https://youtu.be/Dusd3uI33TU
Any thoughts?
Your options are to recreate tile gliding for things that still move by tiles, or recreate pixel movement for projectiles (or go full pixel movement for everything).