![]() |
NPCs and Classes
Just how limited is communication between them?
|
Npcs as in level npcs, database npcs?
|
Not very, anything possible, haha.
|
Classes aren't their own objects, just scripts joined to other objects, I don't see what you're getting at.
|
Doesn't matter if one is joined to an NPC or a weapon, classes are classes. Unless I misunderstood and if you meant NPC is a db-npc, level-npc, or a weapon script.
|
Sorry, I never clarified what I posted this for. I was calling a public function in a DB from a weapon, that places a class, once the class is created it's supposed to call a public function from the same DB. I tried to echo a variable through this manner but it didn't work. :O
Something like his for example: PHP Code:
PHP Code:
|
DB-NPC:
PHP Code:
PHP Code:
|
...I know that would work. What I need is what I posted above for example.
|
PHP Code:
PHP Code:
|
Edit: Inver helped me solve my problem. Thanks tho guys.
|
I don't think you can call putNPC2 in the created function.
|
putnpc2() just needs to be called in something that has a level and on the serverside. Those are only requirements to my knowledge. Trying to call it from a TStaticVar failed spectacularly.
|
Quote:
|
Well, it was the way the DB was named. :O I was using too common a named (Test was the name of it) DB and apparently it was conflicting. :O
|
This is why I had asked long time ago for a list of global variables.
Actually, I would like an allobjects array that represents all the objects active in that space (your client or the server). |
| All times are GMT +2. The time now is 05:43 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.