Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.