hmm use a public function....
weapon name: MYWEAPONTESTLOL/HI
HTML Code:
function onTimeout() {
if(onwater(player.x, player.y) && this.waterTimer == 0) {
findWeapon("MYWEAPONTESTLOL/HI").drawLeap(1, {player.x, player.y});
}
this.waterTimer += 1;
if(this.waterTimer >= 3) this.waterTimer = 0;
setTimer(0.05);
}
inside the weapon 'MYWEAPONTESTLOL/HI' add
HTML Code:
public function drawLeap(type, position) {
putleaps(temp.type, temp.position[0], temp.position[1]);
}
you could even do this if you wanted to be advanced:-
inside the weapon 'MYWEAPONTESTLOL/HI' also add [normally on the onCreated function]
HTML Code:
leapcontrol = this;
then you can just call the function from any weapon clientside by doing
HTML Code:
leapcontrol.drawLeap(type, {x, y});