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 01-03-2006, 05:21 AM
Lord Sephiroth Lord Sephiroth is offline
Babylon OG
Lord Sephiroth's Avatar
Join Date: Jan 2005
Location: Winnipeg, Manitoba, Canada
Posts: 798
Lord Sephiroth will become famous soon enough
Send a message via AIM to Lord Sephiroth
Trivial little thing

I'll be the first to say that i'm not a scripter. I've never been a scripter.
But I do make events pretty good, and I need a little bit of help.
I have a script where it works exactly how I want it to, except it can't be seen by all other players.
So im asking the experts, how would I make this so that it does the same thing, (if player touches a block, it shoots an arrow with a .5 second cool down time), except it can be seen/hurt other players?

This is what I have so far:
NPC Code:

//#CLIENTSIDE
if (playertouchsme) {
if (!this.mytimer) {
shootarrow 3;
set this.mytimer;
timeout = .5;
}
}
if (timeout) {
unset this.mytimer;
}


When I unclientside it, the entire thing just doesn't work.
I know timeout and playertouchsme don't work together.
Help?
__________________
Babylonian; wherever I or it may lay.
Reply With Quote
  #2  
Old 01-03-2006, 05:30 AM
Lord Sephiroth Lord Sephiroth is offline
Babylon OG
Lord Sephiroth's Avatar
Join Date: Jan 2005
Location: Winnipeg, Manitoba, Canada
Posts: 798
Lord Sephiroth will become famous soon enough
Send a message via AIM to Lord Sephiroth
Lol I think I put this in the wrong part of this forum, if someone could move it (if its in the wrong place) that'd be nice =x
__________________
Babylonian; wherever I or it may lay.
Reply With Quote
  #3  
Old 01-03-2006, 08:03 AM
angelukiller angelukiller is offline
Registered User
Join Date: Aug 2005
Posts: 2
angelukiller is on a distinguished road
WHat do you mean by unclientside?
dont just delete the clientside put serverside....thats the best i can do to help
Reply With Quote
  #4  
Old 01-03-2006, 08:07 AM
Kronan Kronan is offline
yo
Kronan's Avatar
Join Date: May 2001
Location: Florida, USA
Posts: 682
Kronan is on a distinguished road
Send a message via ICQ to Kronan Send a message via AIM to Kronan Send a message via Yahoo to Kronan
Quote:
Originally Posted by angelukiller
WHat do you mean by unclientside?
dont just delete the clientside put serverside....thats the best i can do to help
When //#CLIENTSIDE does not exist in a script the NPC server reads it as serverside.

----


And your problem is: shootarrow() is a clientside-only script. It will not work serverside. It would be a smart idea to check the wiki before posting.

http://wiki.graal.us/GScript
__________________
Reply With Quote
  #5  
Old 01-03-2006, 08:14 AM
Lord Sephiroth Lord Sephiroth is offline
Babylon OG
Lord Sephiroth's Avatar
Join Date: Jan 2005
Location: Winnipeg, Manitoba, Canada
Posts: 798
Lord Sephiroth will become famous soon enough
Send a message via AIM to Lord Sephiroth
Quote:
Originally Posted by Kronan
And your problem is: shootarrow() is a clientside-only script. It will not work serverside. It would be a smart idea to check the wiki before posting.

http://wiki.graal.us/GScript
Zzz. I know shootarrow is clientside only, I'm wondering if there's an easy way to edit the script so that people can see it.
It's a legitimate thread, don't patronise me with the wiki.

Anyone have a -good- contribution?
A "Yes it can be done" or a "No it can't" would be helpful.
__________________
Babylonian; wherever I or it may lay.
Reply With Quote
  #6  
Old 01-03-2006, 02:05 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
Quote:
Originally Posted by angelukiller
WHat do you mean by unclientside?
dont just delete the clientside put serverside....thats the best i can do to help
Do not give bad advice.

//#SERVERSIDE does NOT exist. What Kronan says is correct.
Quote:
Originally Posted by Lord Sephiroth
Anyone have a -good- contribution?
Using shoot() is an alternative, however, you would have to design the projectile yourself and hurt the player when received, say, in a weapon.
__________________
Skyld
Reply With Quote
  #7  
Old 01-03-2006, 08:27 PM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
instant message Seph
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 04:32 AM.


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