Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 08-23-2017, 02:07 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
I'm pretty desperate for help on this. I'm in over my head.

I'm trying to sync the blocks with everyone in the level. My first guess was to use triggerServer or triggerAction but I can get neither of those to work inside of a class (I've since read that triggerServer doesn't work in local or class NPCs without a hacked workaround).

I thought something like this would work, but no dice on this as well. I just can't grasp what I'm doing wrong.

PHP Code:
function onActionFoo () { 
// also tried onActionServerSide() when using 0,0 as triggerAction coordinates.
  
echo("bar");
}

//#CLIENTSIDE
function onCreated() {
  
setshape(1,32,32);
}

function 
onPlayerChats() {
  if (
player.chat == "foo") {
    echo(
"foo");
    
triggerAction(x,y"Foo"NULL);
  }

I'm circling back around to having to use a timeout in the blocks, but I feel like that is a hack option and could cause lag if I had a level with dozens of blocks inside all with a nested loop.
__________________
Save Classic!
Reply With Quote
 


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 09:43 AM.


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