I am curious as to how I would use a triggeraction to trigger an action in a joined class? Or is this not possible?
Class:
PHP Code:
//#CLIENTSIDE
public function onActionHurt(acct) {
player.hearts -= 0.5;
player.chat = "hurt by" SPC acct;
setani( "human2_hurt", NULL);
}
Weapon:
PHP Code:
//#CLIENTSIDE
function onCreated() {
player.join("hurt");
}
function onKeyPressed() {
ar = {player.x + (vecx(player.dir) * 2) + 1.5, player.y + (vecy(player.dir) * 2) + 1.8};
triggeraction( ar[0], ar[1], "Hurt", player.account);
}
I have 2 accounts logged in. But only 1 account can hit the other. Is there any reason for this?