1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("serveraction","_sa") function _sa(id) 	if player(id,"money")> 999 and act==3 then -- requires money to activate 		parse("spawnprojectile 47 "..player(id,"x").." "..player(id,"y").." "..z.." "..a) 	end end
What I need: projectile that travel towards nearest enemy (range setting would be nice)
As title explains, I don't know how to replace z and a with something that makes it to launch towards them.
Assuming that:
z = nearest enemy distance
a= nearest enemy position
Not meaning that it chases enemy until end of the world, the projectile only lands on the last their position at the moment the launcher being released.
PS: the money activation is just example, though.