Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-02-2009, 12:41 AM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by cbk1994 View Post
Unfortunately, no, though it would be very useful and would be a nice addition to the scripting language.

You can, however, do stuff like

PHP Code:
temp.importantDatabases = {(@ "Control-NPC"), DB_PlayerStatsDB_Bank};
temp.lists = {this.level.npcsplayer.weaponsimporantDatabases};

for (
temp. list : lists) {
  for (
temp.obj : list) {
    
obj.trigger("myFunction""...");
  }

for most cases
I'll probably whip something up. It'll be a bit more complex because I need it the object list to dependent on what ever is in the Weapons/NPCs lists, and update automatically when weapons are added and removed (for server triggers).

I could scan the weapons/* folder, but that'd be so insecure.

Another possibility is a global register of weapons and NPCs and that a requirement is to have a class joined to every created weapon/npc.

Either way isn't a totally ideal solution. I'll just experiment.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:27 PM.


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