I have a game log parsing project creating objects to store statictics
that it gathers from readin a log file(big text file) When it encounters
a new item in the log, it creates a script object and I have many
properties in there that I will be using to store separate stats per
object. I also have some functions within that behavior script that I
would like to call outside the behavior script. What is the best way to
call a function that exists inside the behavior script, from outside
that script? Hope I'm clear enough on the question. The functions I
would like to call are functions that will modify some properties of the
object. Heres what I have.

Person chooses the log file, hits a button, this reads the whole log
file into a list, works great.

Then I go into a repeat loop that goes through the list "line by line"
and when it finds a line with a new name on it, it creates an object
like so...

s=script("playerscript").new(playername)

I pass playername to the object so it will store its own name(this
project is a game log parser).

My behavior script also contains functions that will update the name if
called and the oldname and newname are passed and are matched with that
instance.

Anyways, throughout the big repeat loop, each line defines another
action that has taken place during the round, such as player1 killed
player2 with whateverweapon.

What would be the best way to call the behavior script from within the
main repeat loop, so that I can call functions within the behavior
scripts of the objects, and pass arguments.

Would I just use:
        script("playerscript").changename(oldname,newname)

?

Hoping I explained enough to get some help. Thanks

Jeremy


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to