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 07-01-2008, 11:16 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
Triggering a class

I would like to know if you could help me, Vulgar has been working on trying to trigger a class to a class using multiple triggeractions, he has had no luc kand I don't really know what to say to him.

Would there be any way of doing this ?
He is trying to trigger an event in he class just like you do in a normal weapon using a triggeraction or triggerserver only they won't work.

Thnaks for your help
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #2  
Old 07-01-2008, 11:20 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
You do not trigger the class itself. You trigger the NPC that the class is joined to, since all a class does is extend the NPC's functions with those defined in the class. For a level NPC, a normal triggeraction will suffice. For a database NPC or weapon, triggerserver will work.
Reply With Quote
  #3  
Old 07-01-2008, 11:23 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
Oh, really.. Thanks, the way Malora has its spells set up I think each spell is a class and well that wont work too well if that is the case xD

Well Maloria has hit a bump in the road this time until something's sorted out;
Thanks anyway Skyld.
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #4  
Old 07-02-2008, 01:07 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Just think of a class as an inlined set of functions.
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 07-02-2008, 01:41 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Zanzel View Post
Oh, really.. Thanks, the way Malora has its spells set up I think each spell is a class and well that wont work too well if that is the case xD

Well Maloria has hit a bump in the road this time until something's sorted out;
Thanks anyway Skyld.
If it's the correct object, why can't you just trigger the object? If it's not the correct object, why don't you just define some functions in a weapon and trigger that weapon?
For example, if you have a block in a level and you need to trigger it from clientside to serverside you could just put this in the class it's joined to:
PHP Code:
function onCreated() {
  
setshape(13232);
}
function 
onActionTrigger() {
  
chat params[0];
}
//#CLIENTSIDE
function onPlayerTouchsme() {
  
triggeraction(this.0.5this.0.5"Trigger""hi");

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
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 01:50 AM.


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