![]() |
npcs[0].id
ask a bunch of npcs what their id is (npcs[0].id).
Offline, they'll all give different answers. Online, they'll all say 1. Has this been secretly deprecated and nobody told me? -_- |
Quote:
|
It's possible that npcs[0] was always the current npc (this), but it has been changed, now npcs[] is actually level.npcs[]. On the other hand players[0] on client-side is still the current player when I remmember correctly.
|
Alright, so for an NPC to get its own ID it has to go level.npcs[0].id? Or does it have to search through level.npcs[] until it finds itself? :-P
|
Quote:
|
Oh, gosh, that's loads easier.
Now if I can just figure out how to get a nonzero value returned for npcscount, level.npcscount, npcs[i].x, level.npcs[i].x.... |
npcscount should normally work fine, otherwise use npcs.size() or level.npcs.size(). If those don't exist then the npc is probably not in a level (control-npc timeout ?)
|
chompy taught me with(findareanpcs(etc)), thx all. :-D
|
| All times are GMT +2. The time now is 02:31 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.