Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   If Problem (https://forums.graalonline.com/forums/showthread.php?t=64578)

projectigi 03-07-2006 07:14 PM

yeah I do lol
give me another way to make a baddy smooth =D
also this thread was supposed to talk about why the if doesnt work and not to talk about .05 serverside timeouts
its not even done xD

napo_p2p 03-07-2006 10:09 PM

I haven't scripting movement in a long time, but I remember that the 'move' command had ways to cache movement so that serverside NPCs didn't look so "laggy."

Perhaps look into that? I'm sure there are threads in the forums about it.

EDIT: Found this, might help (for move command's last param):
Quote:

- cachingmode:
- 0: previous movements will be finished immediatelly
- 1: movements will be cached, the previous movements
will only be finished when the cache is too large
(distance to go >5);
this caching can be used on server-side npcs to
make the movement look like non-laggy even when
there are little delays sometimes
- 2: the movement will just be appended to the movement
list; you can add up to 100 movements
- blockcheck: add 4 to the options when you want the
npc to stop when there is a wall blocking the npc
- informmewhendone: if you add 8 to the options then the
script will be called with a 'movementfinished' flag
when the the npc has stopped walking; catch this event
with
if (movementfinished) {...}
if you want to do something when the npc has stopped
(e.g. walking in a different direction)
- applydirection: add 16 to the options if you want the
game to automatically set the direction of the npc
depending on the movement direction (can be good
when using movement caching)


projectigi 03-07-2006 11:37 PM

as i said this thread is NOT supposed to talk about timeouts/lags
it supposed to talk about why this if doesnt works
and as i said it isnt done

napo_p2p 03-08-2006 01:28 AM

Quote:

Originally Posted by projectigi
as i said this thread is NOT supposed to talk about timeouts/lags
it supposed to talk about why this if doesnt works
and as i said it isnt done

Hmm...

Quote:

give me another way to make a baddy smooth =D
Didn't you say that? Was just trying to help.

Ajira 03-08-2006 01:32 AM

Quote:

Originally Posted by projectigi
as i said this thread is NOT supposed to talk about timeouts/lags
it supposed to talk about why this if doesnt works
and as i said it isnt done

I think someone needs to understand that the minimum timeout on serverside is .1.

jake13jake 03-08-2006 02:31 AM

Quote:

Originally Posted by Ajira
I think someone needs to understand that the minimum timeout on serverside is .1.

Actually, you can have any timeout serverside now, it's just not wise to have a small timeout, not even 0.1.

However, there's still a bit of functionality in small timeouts. Let's say that you had an object you laid, you trigger it to activate, and then there's a time until deactivation required in the parameters of the trigger. Perhaps you'd want that to be 0.05, or perhaps 0.1. In most cases it probably wouldn't make sense, but there's probably a scenario that exists in which it does.

Now, looping timeouts serverside is a different story. I'd say 0.6 is the highest I'd go for them, and then only if the level has players in it. Such the case for Baddies.

A looping 0.05 serverside timeout is certainly enough to seriously risk crashing the NPC server.


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

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