View Single Post
  #1  
Old 02-11-2010, 11:28 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Post player.join and triggeraction?

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.+ (vecx(player.dir) * 2) + 1.5player.+ (vecy(player.dir) * 2) + 1.8};
  
triggeractionar[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?
Reply With Quote