![]() |
Move Script to stop
So I'm using FP4's movement script for npcs (http://forums.graalonline.com/forums...ad.php?t=85370)
and I'm trying to let the actions be interrupted so the npc will stop to chat and other stuff, w/o it being set in the actions and instead by onPlayerTouchsMe, I've added these to the level npc (remember fp4's stuff is also there, these are just additions, I believe the way I'm triggering is probably the problem): PHP Code:
PHP Code:
|
You're in luck, I actually updated that script for my use elsewhere about a year ago. I posted my changes here. I would recommend keeping it client-side though.
|
Awesome. Thanks!
I wanted it serverside so the npc is at the same spot for everyone, due to party quests, ect. |
Errrr nm.
If you set it both on clientside and serverside in the same class it seems to mess it up. If you need it serverside, just leaving it only serverside works fine. Dunno or understand why but thats what just happened xD |
Also to my original problem. I still need to trigger from the weapon showing the dialog to the level npc, so on a waitfor it knows when to continue. I'm still basically using the same thing, send a trigger to server in weapon, send a trigger serverside in weapon to serverside on level npc.
On the level npc now though it's just this for waiting for the trigger from the wnpc: PHP Code:
The weapon npc: PHP Code:
|
Try using a database NPC variable instead of a level variable. I.e.
("Control-NPC").npc.jaqor = this; then in your script.. ("Control-NPC").npc.(@params[1]).trigger("Resume"); |
Changed above post to match what I have. Sorry about that.
It's still mostly the same. I might just have the wrong idea of how this is supposed to work, but from my understanding you call the trigger to the level npc from the serverside of the wnpc. The level npc sits with a waitfor, waiting for that trigger name to pull up, from the trigger sent from the wnpc. Like I said I've tried onDialogDone and DialogDone as well in the waitfor. Ill just post what I got so we're up to date with each other xD Still not working unfortunately... wnpc: PHP Code:
PHP Code:
|
in your server-side portion verify that you're actually sending a trigger to the right place and that you can see it's nickname (give it one):
echo("trigger" SPC params[1]); echo(("Control-NPC").npc.(@params[1]).nick); |
Yup.
NPC Code:trigger Jaqor That was echo("trigger" SPC params[1]); Putting .nick didn't work. |
Quote:
|
Quote:
Variables are case-sensitive: PHP Code:
|
Oh goodness.....
Sorry and thanks for pointing that out. It's always really stupid things that get me stuck. xD |
Quote:
|
I did. Just didn't pay that much attention I guess.
|
| All times are GMT +2. The time now is 02:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.