I want to a message appears in screen when some time passed, and the seconds to wait must be the value of fatigue of a creature entering combat with the player. Anybody knows? It dont work...
float timer float value short playonce
Begin OnStartCombat player
set value to GetActorValue fatigue
set timer to ( timer + getsecondspassed ) if ( timer >= value ) Message "all done in %.0f seconds ", timer, 10 set timer to 0 endif
end
Morgoth
Apr 5 2006, 04:18 PM
Is that meant to be written in the Morrowind scripting language? If so, you've got the names of a few functions wrong. Here's a proposal, haven't tested it, but you may just be lucky and it works. I assume the script is meant to placed on the attaking actor.
CODE
Begin YourScriptNameGoesHere
;stores the time passed after combat has started float timer ;keeps track of how far the whole thing has progressed short state
;wait until the actor can see the player, then attack if ( state == 0 ) if ( GetLOS Player == 1 ) StartCombat Player set state to 1 endif ;increase timer until it is greater or equal to the actor's maximum fatigue ;then display the message box elseif ( state == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= GetFatigue ) MessageBox "All done in %.0f seconds", timer, "Ok" set state to 9999 endif endif
End YourScriptNameGoesHere
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.