The Nexus Forums: Help With An Easy Script, Please - The Nexus Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help With An Easy Script, Please

#1 User is offline   Silmarilio 

  • Stranger
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 27-March 06

Posted 04 April 2006 - 11:34 PM

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
0

#2 User is offline   Morgoth 

  • Bauglir
  • PipPipPip
  • Group: Members
  • Posts: 878
  • Joined: 23-August 03

Posted 05 April 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.

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

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Skin by Skinbox
Quality & cheap IPB skins, premade vBulletin styles, cheap Web templates and more! - Skinbox