Axe Software Forums
  Quest Developer Forum
  Whats the point?


Author Topic:   Whats the point?
Jim Jones posted 07-12-2002 20:14 GMT     
Whats the point of running a script a number of times, or for every object in the game?
MaDbRiT posted 08-12-2002 09:26 GMT          
Jim wrote:

quote:

Whats the point of running a script a number of times, or for every object in the game?

Often not a lot Jim, it's not a feature you'll use every day! BUT there are times where being able to do this is a huge time saver for the coder, or actually makes otherwise impossible things possible. An example will clear this up I hope.

In my "typelib.qlb" I let coders define objects to be of specific types and set properties in QDK. Say they create 100 objects, 15 of which are "container" types and therefore need my setup script to carry out some fancy manipulation at the start of the game to provide them with contents lists etc.

As author of "typelib" I cannot possibly know in advance how many objects will be created by the eventual user, what names they will be given or whether they will be set to be 'container' types. So the ONLY way to find out is to use a script that cycles through every object in the game and checks it, making contents lists where the object is a container etc...

This is pretty advanced coding territory and and you may not have a use for the ability to do this sort of thing now (or ever!) but trust me, being able to do this is VITAL to making libraries like "typelib" and indispensible in an object-oriented coding structure like Quest A.S.L.

Al