Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Triggeraction not working. (https://forums.graalonline.com/forums/showthread.php?t=56689)

googleman 12-27-2004 02:00 PM

Triggeraction not working.
 
So I was coding for my server when triggeraction stops working.

I look over my code trying to find a solution, but the code runs ignoring the triggeraction.

After looking for about two hours I decide to view code that I made a while which I know works, and it doesn't... Not offline nor online.

I am quite tired so I might be doing something wrong, but I made this test npc which didn't work:

NPC Code:
if (actionserverside) {
sendtorc Test;
}

//#CLIENTSIDE
if (created) {
triggeraction x,y,serverside,;
}



Looks good to me.. For some reason it doesn't work.

Loriel 12-27-2004 02:09 PM

Weapons:
NPC Code:
if (actionserverside) {
sendtorc Test;
}
//#CLIENTSIDE
if (created) {
triggeraction 0,0,serverside,<weapon name goes here>;
}



NPCs:
NPC Code:
if (created) {
setshape 1,32,32;
}
if (actionwhatever) {
sendtorc Test;
}
//#CLIENTSIDE
if (created) {
triggeraction x+1,y+1,whatever,;
}


googleman 12-27-2004 02:13 PM

Ohh, that's what I forgot. setshape 1,32,32;

Thanks.

WanDaMan 12-27-2004 03:27 PM

Do you know why he has used setshape?

Evil_Trunks 12-27-2004 05:58 PM

The setshape is not required.

triggeraction x,y,name,; should trigger it.

The only inconsistency with this is "showcharacter;" type NPCs. They require x/y + whatever.

Loriel 12-27-2004 06:27 PM

Quote:

Originally Posted by Evil_Trunks
The setshape is not required.
triggeraction x,y,name,; should trigger it.

Did you test this? I am reluctant to believe it.

Quote:

The only inconsistency with this is "showcharacter;" type NPCs. They require x/y + whatever.
Do you understand why?
It is not an inconsistency.

Evil_Trunks 12-27-2004 06:28 PM

Quote:

Originally Posted by Loriel
Did you test this? I am reluctant to believe it.

Quote:

The only inconsistency with this is "showcharacter;" type NPCs. They require x/y + whatever.
Do you understand why?

No, I do not understand why, but I have tested this out before
Quote:

Originally Posted by Loriel
It is not an inconsistency.

Maybe inconsistency isn't the right word, I don't know what you mean by this

googleman 12-28-2004 06:10 AM

It's required for NPCs that don't have an image set.

osrs 12-28-2004 06:20 AM

Quote:

Originally Posted by Evil_Trunks
No, I do not understand why, but I have tested this out before

Maybe inconsistency isn't the right word, I don't know what you mean by this


Just wanted to remember you that you are arguing with Loriel, if you don't want to lose your arguments, so it's better be quiet. ^^
(ironic points + 1)

Evil_Trunks 12-28-2004 06:27 AM

Quote:

Originally Posted by googleman
It's required for NPCs that don't have an image set.

I clearly remember doing it with NPCs that do not have an image...

just an NPC like this

PHP Code:

if (actionsomething) {
  
setplayerprop #c,works;
}
//#CLIENTSIDE
if (playerchats) {
  
triggeraction x,y,something,;


this is stripped down from an actual NPC which has been online

ZeroTrack 12-28-2004 08:43 AM

no to do local npcs like that they have to be
PHP Code:

if(actionbleehhsendtorc Test;

//#CLIENTSIDE
if(playertouchsmetriggeraction x+1,y+1,bleehh,; 

if your not gonna use setshape


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

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