Silmarilio Posted April 4, 2006 Share Posted April 4, 2006 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 timerfloat valueshort playonce Begin OnStartCombat player set value to GetActorValue fatigue set timer to ( timer + getsecondspassed )if ( timer >= value ) Message "all done in %.0f seconds ", timer, 10set timer to 0endif end Link to comment Share on other sites More sharing options...
Morgoth Posted April 5, 2006 Share Posted April 5, 2006 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. 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.