Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-11-2009, 06:50 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Cubes View Post
can I use Andys XY triggeraction to trigger serverside in the same npc?
You are triggering serverside since it's a level npc. Level npcs trigger to the serverside to the function denoted by onActionFunctionName().

Quote:
Originally Posted by cbk1994 View Post
This ensures that you'll always get to that NPC, even if there's another NPC on top of it, which could cause problems when using triggeraction.
It isn't really a problem unless both NPCs have the same function name, but yes, probably better to rely on the object rather than an x/y position.
Reply With Quote
  #2  
Old 06-11-2009, 06:59 PM
Cubes Cubes is offline
Registered User
Cubes's Avatar
Join Date: Dec 2005
Location: Chesapeake, Virginia
Posts: 498
Cubes is a jewel in the roughCubes is a jewel in the rough
Quote:
Originally Posted by Gambet View Post
You are triggering serverside since it's a level npc. Level npcs trigger to the serverside to the function denoted by onActionFunctionName().



It isn't really a problem unless both NPCs have the same function name, but yes, probably better to rely on the object rather than an x/y position.
Well this is what I tried and I cannot get it to work, I have no clue what's wrong with it.
Quote:
function onActionTestT(){
level.rofltest = "works";
player.chat = level.rofltest;
}
//#CLIENTSIDE
function onCreated(){
onTestTrigger()
}
function onTestTrigger(){
triggeraction(this.x, this.y, "TestT", NULL);
}
Reply With Quote
  #3  
Old 06-11-2009, 07:00 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Cubes View Post
Well this is what I tried and I cannot get it to work, I have no clue what's wrong with it.

You haven't defined a shape for the object, you need a setShape() in the serverside.
Reply With Quote
Reply


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 07:19 PM.


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