If this was "move" hook it would work on moving. However when moving you change pixel position a lot of times, so it looks like I shoot snowball rays around me.. How can I change it so this would trigger on movetile. (now I changed to movetile hook and i get no errors but also NOTHING happens..)
Forum




Need solution for "Move" hook.
1 reply



If this was "move" hook it would work on moving. However when moving you change pixel position a lot of times, so it looks like I shoot snowball rays around me.. How can I change it so this would trigger on movetile. (now I changed to movetile hook and i get no errors but also NOTHING happens..)
1
2
3
2
3
if math.random(1, 10) == 1 then 	//shoot snowballs and shit end
in a movehook, so it triggers only occasionaly.
----
Or you could make it a movehook, but add a counter (if counter[id] == 32 then shoot stuff) for them.
Your current error is that a move hook returns tilex and tiley, but your player and spawnprojectile things are pixelx and pixely.
You could do something like;
1
local x, y = x * 32 + 16, y * 32 + 16
To make the projectiles spawn in the center of the tile, or;
1
local x, y = player(id, 'x'), player(id, 'y')



