Question about how fast scripts get activated in result box

Post » Sun May 01, 2011 1:57 pm

Ok, i'm starting a bunch of scripts at once. My question is how fast does morrowind process the scripts in the result box?

If i put this in the result box

startscript, "Ascript"
startscript, "Bscript"

Do they both activate at the same time and when i mean same time i mean literally the same frame. Or does Ascript start first THEN bscript. And if so if i were to set up a global variable for script A and it sets a global variable does it process Ascript fast enough before starting Bscript if i did use the same global variable?
User avatar
KRistina Karlsson
 
Posts: 3383
Joined: Tue Jun 20, 2006 9:22 pm

Post » Sun May 01, 2011 3:56 pm

I'm not sure how fast they will start or process. What I would do is:
- start "Ascript" in the dialogue result
- startscript "Bscript" at the end of "Ascript", after you've set all of the globals you need
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Mon May 02, 2011 1:11 am

Oh duh. I actually got it to work anyhow. Check out one of the scripts i have to use.

Begin EbonyRemoveScript            if ( SGV >= 15 )        stopscript, ebonyremovescript    endif            if ( Ebony == 1 )        player->removeitem, "ebony war axe", 1        set SGV to SGV + 1        stopscript, ebonyremovescript    endif    if ( Ebony == 2 )        if ( SGV <= 13 )            player->removeitem, "ebony war axe", 2            set SGV to SGV + 2            stopscript, ebonyremovescript        ELSEIF ( SGV == 14 )            player->removeitem, "ebony war axe", 1            set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 3 )        if ( SGV <= 12 )            player->removeitem, "ebony war axe", 3            set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2            set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1            set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 4 )        if ( SGV <= 11 )            player->removeitem, "ebony war axe", 4            set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3            set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2            set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1            set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 5 )        if ( SGV <= 10 )            player->removeitem, "ebony war axe", 5            set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4            set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3            set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2            set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1            set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 6 )        if ( SGV <= 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 7 )        if ( SGV <= 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV== 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 8 )        if ( SGV <= 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript         elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 9 )        if ( SGV <= 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 10 )        if ( SGV <= 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 11 )        if ( SGV <= 4 )            player->removeitem, "ebony war axe", 11                        set SGV to SGV + 11            stopscript, ebonyremovescript        elseif ( SGV == 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 12 )        if ( SGV <= 3 )            player->removeitem, "ebony war axe", 12                        set SGV to SGV + 12            stopscript, ebonyremovescript        elseif ( SGV == 4 )            player->removeitem, "ebony war axe", 11                        set SGV to SGV + 11            stopscript, ebonyremovescript        elseif ( SGV == 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 13 )        if ( SGV <= 2 )            player->removeitem, "ebony war axe", 13                        set SGV to SGV + 13            stopscript, ebonyremovescript        elseif ( SGV == 3 )            player->removeitem, "ebony war axe", 12                        set SGV to SGV + 12            stopscript, ebonyremovescript        elseif ( SGV == 4 )            player->removeitem, "ebony war axe", 11                        set SGV to SGV + 11            stopscript, ebonyremovescript        elseif ( SGV == 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 14 )        if ( SGV <= 1 )            player->removeitem, "ebony war axe", 14                        set SGV to SGV + 14            stopscript, ebonyremovescript        elseif ( SGV == 2 )            player->removeitem, "ebony war axe", 13                        set SGV to SGV + 13            stopscript, ebonyremovescript        elseif ( SGV == 3 )            player->removeitem, "ebony war axe", 12                        set SGV to SGV + 12            stopscript, ebonyremovescript        elseif ( SGV == 4 )            player->removeitem, "ebony war axe", 11                        set SGV to SGV + 11            stopscript, ebonyremovescript        elseif ( SGV == 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    if ( Ebony == 15 )        if ( SGV == 0 )            player->removeitem, "ebony war axe", 15                        set SGV to SGV + 15            stopscript, ebonyremovescript        elseif ( SGV == 1 )            player->removeitem, "ebony war axe", 14                        set SGV to SGV + 14            stopscript, ebonyremovescript        elseif ( SGV == 2 )            player->removeitem, "ebony war axe", 13                        set SGV to SGV + 13            stopscript, ebonyremovescript        elseif ( SGV == 3 )            player->removeitem, "ebony war axe", 12                        set SGV to SGV + 12            stopscript, ebonyremovescript        elseif ( SGV == 4 )            player->removeitem, "ebony war axe", 11                        set SGV to SGV + 11            stopscript, ebonyremovescript        elseif ( SGV == 5 )            player->removeitem, "ebony war axe", 10                        set SGV to SGV + 10            stopscript, ebonyremovescript        elseif ( SGV == 6 )            player->removeitem, "ebony war axe", 9                        set SGV to SGV + 9            stopscript, ebonyremovescript        elseif ( SGV == 7 )            player->removeitem, "ebony war axe", 8                        set SGV to SGV + 8            stopscript, ebonyremovescript        elseif ( SGV == 8 )            player->removeitem, "ebony war axe", 7                        set SGV to SGV + 7            stopscript, ebonyremovescript        elseif ( SGV == 9 )            player->removeitem, "ebony war axe", 6                        set SGV to SGV + 6            stopscript, ebonyremovescript        elseif ( SGV == 10 )            player->removeitem, "ebony war axe", 5                        set SGV to SGV + 5            stopscript, ebonyremovescript        elseif ( SGV == 11 )            player->removeitem, "ebony war axe", 4                        set SGV to SGV + 4            stopscript, ebonyremovescript        elseif ( SGV == 12 )            player->removeitem, "ebony war axe", 3                        set SGV to SGV + 3            stopscript, ebonyremovescript        elseif ( SGV == 13 )            player->removeitem, "ebony war axe", 2                        set SGV to SGV + 2            stopscript, ebonyremovescript        elseif ( SGV == 14 )            player->removeitem, "ebony war axe", 1                        set SGV to SGV + 1            stopscript, ebonyremovescript        endif    endif    end	


Makes your brain turn to moosh at least it does for me. The script works this is one among seven. I'm checking the players inventory with another script and then these seven scripts, will remove at least 15 ebony weapons total depending of how many of each item the player has in their inventory.
User avatar
Jessie
 
Posts: 3343
Joined: Sat Oct 14, 2006 2:54 am


Return to III - Morrowind