PHP Code:
function onPlayerChats() {
if (player.chat == ":destroy")
this.destroy();
}
//#CLIENTSIDE
function onCreated() {
setimg("era_pl9-bullet.png");
setshape(1,32,32);
setTimer(0.05);
this.owneraccount = player.account;
this.dird = player.dir;
this.spread = random(-client.spread,client.spread);
scheduleevent(5,"Destroy","");
}
function onTimeOut() {
this.x += vecx(this.dird) + (player.dir in {0, 2} ? this.spread/16 : 0);
this.y += vecy(this.dird) + (player.dir in {1, 3} ? this.spread/16 : 0);
setTimer(0.05);
}
I am trying to make a custom projectile.
Well, it works fine unill now, the only part that is missing, is the damage part.
Well, I am stuck, how can I make it damage on Hit, without using shoot()?