Scripting: World Open

Posted by Magnum on Tue 30 Jul 2002 04:48 PM — 4 posts, 11,275 views.

Canada #0
As far as I can tell, if you reload a script file (using the pulldown menu, for example), the automated script calls like "World Open" are not called.

I feel they should be called, as if the world had just been opened as a fresh session.
Amended on Tue 30 Jul 2002 04:49 PM by Magnum
Australia Forum Administrator #1
But the world hasn't been opened.

The "world open" callback is for doing things when the world is opened, eg. sending a connect script.

The "script install" is called, that is what you should be using.
Canada #2
I'm not talking about plugins... rather:

Game > Configure > Scripting > Events

Which field should I fill in with the subroutine I want to have called everytime the script is initiated, whether it be on a world open, or on a forced reload of the script?

Oh, wait now... Are you saying I can just put a subroutine with a particular name, and it will get called automatically... Let me check the sample script file...

(After Checking)... Nope, I just looked through the VBS sample file, and don't see anything there either. I don't see anything related to "Script Install" anywhere... I'm not sure what you are talking about.

I suppose I could just write calls to the routine directly in the script file (MainLine), which would get executed the way I want. For some reason, I only thought of this right this moment, even though I already used that method for the old way of loading "include" script files. Of course! Duh.

Uhm, I feel like a dummy now. I hate that. Sorry for wasting your time with a question I already knew the answer to... sort of. Maybe this will help someone not so knowledgable with scripting. :)
Australia Forum Administrator #3
You are right. As I started reading your post I was about to say "put a call in the main part of the script" but you realised that towards the end.