Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Trivial little thing (https://forums.graalonline.com/forums/showthread.php?t=63168)

Lord Sephiroth 01-03-2006 05:21 AM

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? :(

Lord Sephiroth 01-03-2006 05:30 AM

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

angelukiller 01-03-2006 08:03 AM

WHat do you mean by unclientside?
dont just delete the clientside put serverside....thats the best i can do to help

Kronan 01-03-2006 08:07 AM

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

Lord Sephiroth 01-03-2006 08:14 AM

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.

Skyld 01-03-2006 02:05 PM

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.

Alexander 01-03-2006 08:27 PM

instant message Seph


All times are GMT +2. The time now is 11:58 AM.

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