![]() |
triggeraction/callnpc barrier
Why am I unable to do a triggeraction with params to one NPC that will do a triggeraction back with params? I've tried the combination of doing triggeraction and responding with callnpc but nothing happens. The purpose of this is to create something of a pathnode system which I can send NPCs to run along. I'm sure there are better ways of having an NPC get from point A to point B. This is just the way I chose.
*note This is a crude script at the moment. All I'm doing is testing my idea without too much success :(. <sending NPC> NPC Code: <recieving NPC> NPC Code: 'lag' is used to determine the actual time distance (in tiles). The 'recieving NPC' works. I just can't get the sender to respond to the callnpc sent to it. showimg is so I know where its triggering :] |
Is the level in the levels list? I've been having trouble using triggeraction on servers too, your script looks fine, i've been trying things like that too and they never seem to work, I think something with triggeraction on servers has changed o0
|
Ew, don't put sleeps in loops. And non-prefixed vars are volatile. It's not guaranteed that their values will be preserved between frames.
|
I'm not 100% sure, but, I believe triggeraction cannot be done from inside a timeout loop. Anyone care to verify?
|
Quote:
|
I believe it's because the timeout loop is too fast for triggeractions. Its the same reason why I was told that a timeout or sleep of 0.05 is necessary in a while loop, otherwise it may crash the npcserver.
|
Quote:
|
yea, triggeraction is common with the NC system, its wats used for practically anything you may need it for. Its faster, easier, and works perfectly. (unless u cant script)
|
Hmm, interesting, I was taught that it would crash the NPC-Server. ::TAKES A CLOSER LOOK AT SCRIPT ABOVE:: =)
|
Quote:
|
Quote:
Quote:
I could probably set a string in the loop that contains the ID, but I'm not sure if NPC Code: will actually use that NPC's ID since what is usually set is somewhere in the thousands range. I haven't tried that yet. |
Quote:
|
Quote:
*edit* Its sort of working. Biggest issue right now is finding a way to make it ignore the last node it walked to when searching for a node that is not in the same direction. |
Ok, I guess someone *cough*Kai*cough* deleted my script. If you want it, just IM me on AIM. My SN is DarkBlade7788.
|
Quote:
|
| All times are GMT +2. The time now is 08:52 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.