
SGWraith
Joined: Apr 15, 2006
[SG] Clan
|
Posted: Sep 4, 2007 04:40 PM
Msg. 1 of 10
For script types there are:
Startup Continuous Dormant Static
Startup only runs at startup and continuous scripts run constantly until told otherwise. Those are fairly easy to understand.
But what is the difference between a static and a dormant script? Both sit there until called upon by another script as far as I can tell.
|
|
|

Rm860
Joined: Sep 7, 2006
Dennis sleeps like this!
|
Posted: Sep 4, 2007 05:50 PM
Msg. 2 of 10
omg a new type of question, thanks so much Wraith.
actually i am curious to know also. dormant script i sort of understand but a static script i have never head that term before.
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Sep 4, 2007 05:52 PM
Msg. 3 of 10
I know static scripts are used to be referenced by UI widgets... And dormant ones are to be "woken" by either a dev command, or an action happening, like say a certain vehicle being destroyed or a certain switch being activated.
|
|
|

Rm860
Joined: Sep 7, 2006
Dennis sleeps like this!
|
Posted: Sep 4, 2007 05:57 PM
Msg. 4 of 10
damn Caboose your smart. For that i bet brain suckers are always after you.
anyone care to explain what an UI widget is?
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Sep 4, 2007 05:59 PM
Msg. 5 of 10
ui_widget_definition tags are basically the menu buttons, like the Time of Day button on Coldsnap.
I know about the scripts from reading what kirby says lol, I just have a really good memory. Edited by Caboose117 on Sep 4, 2007 at 05:59 PM
|
|
|

Orange_Geko
Joined: Nov 19, 2005
How long since I last used this account?
|
Posted: Sep 4, 2007 06:03 PM
Msg. 6 of 10
Quote: --- Original message by: Caboose117 I know static scripts are used to be referenced by UI widgets... And dormant ones are to be "woken" by either a dev command, or an action happening, like say a certain vehicle being destroyed or a certain switch being activated. I always use dormant scripts linked to UI widgets lol. idk what the static ones are for.. I know they can have the same name as another script, so I think the script they share a name with is how they activate some how. ive never used a static, and im sure I never will lol, I can fill in what ever its functions are with the use of other scripts lol.
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Sep 4, 2007 06:06 PM
Msg. 7 of 10
Wait, what the... I remember you saying to use a static script a few days ago.... Well there goes my good memory theory lol.
Nope... Two other people said it... Got it from some scripting utility or something. Edited by Caboose117 on Sep 4, 2007 at 06:09 PM
|
|
|

SGWraith
Joined: Apr 15, 2006
[SG] Clan
|
Posted: Sep 4, 2007 06:56 PM
Msg. 8 of 10
Actually, you can use a static or a dormant script with a ui_widget_definition. Static scripts require return types, making it the only script that will give something back to another script. There was probably a better way to say that but return types turn up in a lot in more advanced/powerful programming languages so there must be something useful for it. If you use the void return type it kinda behaves how a dormant script does. Anyhow, while we are on the subject of ui_widget_definitions I have another question. I'm trying to figure out what the various event_handler_reference_blocks are for and what they do. Awhile ago someone posted a script for time of day and I wanted to try it. I know the script works because I tested it with the coldsnap widget. However, my widget fails to work. :/  The one on the left is Tiamat's and it works. The one on the right is mine, which doesn't. Mine is a modified version of the resume game button because I want it to behave the same. What is that check box for and why is he using racing rules for his function? The other event_handlers are the same for all the other widgets so I understand those. *edit* Found Orange Geko's tutorial again for comparision:  My widget looks just like that one but still doesn't work so I'm kinda confused why mine doesn't work but the coldsnap one does. When I tested the coldsnap widget I edited the script name to be sky_switch which worked fine. Edited by SGWraith on Sep 4, 2007 at 07:15 PM Edited by SGWraith on Sep 4, 2007 at 07:17 PM
|
|
|

Orange_Geko
Joined: Nov 19, 2005
How long since I last used this account?
|
Posted: Sep 4, 2007 08:23 PM
Msg. 9 of 10
Quote: --- Original message by: SGWraith My widget looks just like that one but still doesn't work so I'm kinda confused why mine doesn't work but the coldsnap one does. When I tested the coldsnap widget I edited the script name to be sky_switch which worked fine. im to lazy to figure out how right now, but I dont just have 1 tag that functions the whole thing, I use 2 widget tags (im saving up braincells for school tomarrow lol, so currently im probly using about the IQ of a 8 year old lol)
|
|
|

SGWraith
Joined: Apr 15, 2006
[SG] Clan
|
Posted: Sep 4, 2007 08:55 PM
Msg. 10 of 10
Thats understandable, I'm already in school too. Get back to me whenever you have the time. Its just rather frustating to have things look right and not work - which happens a lot when scripting, lol.
Did you include the unicode_string_list tag when you said 2 widget tags?
|
|
|