Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-02-2008, 11:45 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Serverside onActionProjectile?

I cant seem to get it working on serversided scripts. Dont tell me Ill have to use a bunch of triggeractions
Reply With Quote
  #2  
Old 08-02-2008, 03:02 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Yeah, I was having this problem a while back. Did you use setshape() on serverside?

EDIT: Do you mean onActionProjectile() for players, or for an NPC?
__________________
Reply With Quote
  #3  
Old 08-02-2008, 10:00 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
An NPC that uses showcharacter(). Ill try the setshape when I get back from work :O
Reply With Quote
  #4  
Old 08-02-2008, 11:06 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Yeah, it doesn't seem to work on the serverside. What I did was just use a triggeraction.
Reply With Quote
  #5  
Old 08-03-2008, 12:56 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
I believe the proper function is onActionProjectile2()
Reply With Quote
  #6  
Old 08-03-2008, 01:10 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I think it's onActionSProjectile(). Almost sure ;f

Nevermind, that's for serverside projectiles, says the wiki
onActionProjectile() triggers on serverside when a "projectile has landed". There doesn't seem to be an event when something is hit for serverside stuff, guess you have to do those checks yourself ;P
__________________
Reply With Quote
  #7  
Old 08-03-2008, 01:19 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by TheStan View Post
I believe the proper function is onActionProjectile2()
That's for when a projectile lands, anywhere.
__________________
Reply With Quote
  #8  
Old 08-03-2008, 01:30 AM
Chompy Chompy is offline
»\(║_o)/»
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
That's for when a projectile lands, anywhere.
When does projectiles land? I thought they crashed..
__________________
Reply With Quote
  #9  
Old 08-03-2008, 01:56 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
When does projectiles land? I thought they crashed..
__________________
Reply With Quote
  #10  
Old 08-03-2008, 04:28 AM
Pheonixfire Pheonixfire is offline
(Director)
Pheonixfire's Avatar
Join Date: May 2008
Posts: 3
Pheonixfire is on a distinguished road
You might be able to use an OnActionProjectile() clientside and then use a triggeraction() in response. That works for weapons... But it may be different for showcharacter NPCs.
__________________
The blind seer sees only oblivion.
Reply With Quote
  #11  
Old 08-03-2008, 04:56 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
ergh doing setshape didn't fix it, and yes its a clientside projectile hitting a serverside npc.
Reply With Quote
  #12  
Old 08-03-2008, 05:19 AM
Pheonixfire Pheonixfire is offline
(Director)
Pheonixfire's Avatar
Join Date: May 2008
Posts: 3
Pheonixfire is on a distinguished road
Allow me to clarify. I would add a clientside section with the "function OnActionProjectile()" code, and inside that function put a triggerserver() for a weapon. You could try a triggeraction() since it's not a weapon, and put the onaction in the serverside part of the code. That should work...
__________________
The blind seer sees only oblivion.
Reply With Quote
  #13  
Old 08-03-2008, 06:42 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Ugh so I tried a trigger, why wont this work?
hurtenemy is a function I made in the serverside section of the script that does some other functions. I intentionally left out a few params on the triggeraction, just for testing purposes. Doesn't work though.
NPC Code:
function onActionClientproj() {
hurtenemy();
}
//#CLIENTSIDE
function onActionProjectile() {
triggeraction(x + 0.5, y + 0.5, "Clientproj");
}

Reply With Quote
  #14  
Old 08-03-2008, 07:56 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Uh, setshape on the clientside portion of the class of the npc then?
Reply With Quote
  #15  
Old 08-03-2008, 08:21 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by wild8900 View Post
Ugh so I tried a trigger, why wont this work?
hurtenemy is a function I made in the serverside section of the script that does some other functions. I intentionally left out a few params on the triggeraction, just for testing purposes. Doesn't work though.
NPC Code:
function onActionClientproj() {
hurtenemy();
}
//#CLIENTSIDE
function onActionProjectile() {
triggeraction(x + 0.5, y + 0.5, "Clientproj");
}

As Stan said, set the shape, but also, you should use this.x and this.y since this is GS2.
__________________
Reply With Quote
Reply

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 03:23 AM.


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