Jump to content

Help With An Easy Script, Please


Silmarilio

Recommended Posts

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

Link to comment
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...