Jump to content

Scripts hate me... Or maybe I hate them.


paladicprince

Recommended Posts

Hrmm... I very confused as to why this script freezes oblivion... Any ideas?

 

scn PPTargettingScript

Float fQuestDelayTime
Float Delay

Short Count
Short Num
Short Scan
Short Step

Ref Target1

Begin GameMode

Set fQuestDelayTime to .01

If (Scan == 1)
 If (Count >= Num)
	  Set Num to GetNumRefs 69
	  Set Count to 1

	  Set Target1 to GetFirstRef 69
	  If (Player.GetLOS Target1 == 1)
		   MessageEx "I see: %n", Target1
		   Set Scan to 0
	  EndIf
 ElseIf (Count < Num)
	  Set Count to Count + 1

	  Set Target1 to GetNextRef
	  If (Player.GetLos Target1 == 1)
		   Message "I see: %n", Target1
		   Set Scan to 0
	  EndIf
 EndIf
ElseIf (Delay > 0)
 Set Delay to Delay - GetSecondsPassed
ElseIf (IsKeyPressed3 42)
 Set Scan to 1
 Set Delay to 2
EndIf

End

 

 

Or maybe if you know a better way to get my end result:

 

I want to create a list of all Actors in LOS of the player. This script currently only accounts for one because I figure once I get it working it should be easy to add a few more.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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