Menu script does't work

Post » Sun Jul 25, 2010 4:22 am

I have a problem with my script:

scn WaterHeal1Menu

int iButton

begin ScriptEffectStart
ShowMessage WaterModMenuMsg
end

begin GameMode
set iButton to GetButtonPressed

if (iButton == -1)
Return

;First Button for bottling/rebottling water

elseif (iButton == 0)
player.showrecipemenu WaterModPWaterRecipes

;Second Button for activation of the water source

elseif (iButton == 1)
player.CastImmediateOnSelf WaterHeal1PurifiedChoice
endif

end


The message is show to the player but when a button is selected nothing happens. Through testing i have seen that none of if-conditions is executed. The whole GameMode Block is not executed. My question is, why is this block not executed? When i replace ScriptEffectStart with OnAdd and attach the script to an object all works fine but here not.
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm

Post » Sun Jul 25, 2010 2:15 am

Solved the problem, the effect need a duration to work correctly.
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm


Return to Fallout: New Vegas