Difference between revisions of "Talk:MessageBox Tutorial"
Responses and suggestions
imported>ShadowDancer (another thought to add to question) |
imported>Haama (Responses and suggestions) |
||
Line 271: | Line 271: | ||
:::But the cycles are consistant up until you hit the Duration of 3. To my surprise, MenuMode will not work from a Magic Effect script. GameMode and ScriptEffectUpdate produce the same number of cycles inside of the script with approximately 18-20 FPS (according to ATI) while the effect shader is running (apparently its closer to 18 and increases as the effect shader continues longer than 2 seconds). Based on this latest test, it leads me to believe that the ScriptEffectUpdate runs when the ScriptEffectStart is initialized, runs once just for the ScriptEffectUpdate, and once when the ScriptEffectFinish is run at minimum duration (of 0). I am going to try a test now to determine if the ScriptEffectUpdate will run before the ScriptEffectStart if I place it above that in the script. | :::But the cycles are consistant up until you hit the Duration of 3. To my surprise, MenuMode will not work from a Magic Effect script. GameMode and ScriptEffectUpdate produce the same number of cycles inside of the script with approximately 18-20 FPS (according to ATI) while the effect shader is running (apparently its closer to 18 and increases as the effect shader continues longer than 2 seconds). Based on this latest test, it leads me to believe that the ScriptEffectUpdate runs when the ScriptEffectStart is initialized, runs once just for the ScriptEffectUpdate, and once when the ScriptEffectFinish is run at minimum duration (of 0). I am going to try a test now to determine if the ScriptEffectUpdate will run before the ScriptEffectStart if I place it above that in the script. | ||
:::--[[User:ShadowDancer|ShadowDancer]] 15:26, 28 August 2007 (EDT) | :::--[[User:ShadowDancer|ShadowDancer]] 15:26, 28 August 2007 (EDT) | ||
::::Yes, those numbers make more sense. So ScriptEffectUpdate is every frame, or at least as often as GameMode (I kind-of wonder if the FPS shown is wrong, or if GameMode doesn't run every frame, but not too much) | |||
::::--[[User:Haama|Haama]] 11:50, 29 August 2007 (EDT) | |||
::::OK, this result is <u>really</u> weird. A MessageBox in a ScriptEffectUpdate before a GameMode block will stop the GameMode block from running <u>at all</u> with a zero duration (ScriptEffectUpdate still cycles 3 times though). If the GameMode block is first, it will run <u>once</u> with a zero duration and the spell will go through its full routine (with three passes through the ScriptEffectUpdate block). Once a non-zero duration is included, the GameMode count will be 1 less than the ScriptEffectUpdate count (regardless of script order). | ::::OK, this result is <u>really</u> weird. A MessageBox in a ScriptEffectUpdate before a GameMode block will stop the GameMode block from running <u>at all</u> with a zero duration (ScriptEffectUpdate still cycles 3 times though). If the GameMode block is first, it will run <u>once</u> with a zero duration and the spell will go through its full routine (with three passes through the ScriptEffectUpdate block). Once a non-zero duration is included, the GameMode count will be 1 less than the ScriptEffectUpdate count (regardless of script order). | ||
Line 305: | Line 309: | ||
End</pre> | End</pre> | ||
::::--[[User:ShadowDancer|ShadowDancer]] 16:32, 28 August 2007 (EDT) | ::::--[[User:ShadowDancer|ShadowDancer]] 16:32, 28 August 2007 (EDT) | ||
:::::I wonder what happens if you use printc instead of messagebox? Will the message be displayed once, or multiple times? | |||
:::::--[[User:Haama|Haama]] 11:50, 29 August 2007 (EDT) | |||
:::::A spell can be cast while in MenuMode from a MenuMode script. It doesn't start the Magic Effect script until the player has exited MenuMode. Even a zero duration spell won't start running until back in GameMode. | :::::A spell can be cast while in MenuMode from a MenuMode script. It doesn't start the Magic Effect script until the player has exited MenuMode. Even a zero duration spell won't start running until back in GameMode. | ||
:::::--[[User:ShadowDancer|ShadowDancer]] 03:29, 29 August 2007 (EDT) | :::::--[[User:ShadowDancer|ShadowDancer]] 03:29, 29 August 2007 (EDT) | ||
Ok, so if I understand this correctly, there's no way for the spell to start in MenuMode. I've noticed from Guidobot's Throwing Stars 3 that a MenuMode block will run from a magic script (at least for potions), but he said it will only run for a single frame. | |||
Ok, so that also means that spell menus can only be used from GameMode (not bad, but it's still a point). This also means that there will always be passing time between menus, so the spell must be recast if time runs out. | |||
--[[User:Haama|Haama]] 11:50, 29 August 2007 (EDT) | |||
---- | ---- | ||
Haama, out of curiosity, why do you have so many | Haama, out of curiosity, why do you have so many | ||
Line 315: | Line 328: | ||
--[[User:ShadowDancer|ShadowDancer]] 05:59, 29 August 2007 (EDT) | --[[User:ShadowDancer|ShadowDancer]] 05:59, 29 August 2007 (EDT) | ||
:See [[MessageBox_Tutorial#Running_the_same_choice_for_multiple_frames]]. It's rare, but I've needed to do it, and I've had to answer a couple of threads on it. | |||
:--[[User:Haama|Haama]] 11:50, 29 August 2007 (EDT) |