Sure thing. Didn't want to bloat the first post xD Here ya go:
Scriptname MapWidget extends Quest
String Property Map_Widget = "DivisionMap.swf" AutoReadOnly
HUDFramework hud
int widgetLoaded;
int[] aEnemyDirection;
Keyword Property ActorTypeNPC Auto
ObjectReference[] Property FoundActors Auto
Event onQuestInit()
hud = HUDFramework.GetInstance()
if(hud)
VerifyEvents()
aEnemyDirection = new int[8];
widgetLoaded = 1;
While widgetLoaded
Scan10Meters()
Utility.Wait(1)
EndWhile
Else
Debug.MessageBox("HUDFramework is not installled!")
EndIf
EndEvent
Function VerifyEvents()
RegisterForRemoteEvent(Game.GetPlayer(), "OnCombatStateChanged")
EndFunction
Function HUD_WidgetLoaded(string myWidget)
if (myWidget == Map_Widget)
Debug.Trace("Map module updated survivor.")
;hud.SendMessage(Map_Widget, HUD_Initialize)
EndIf
EndFunction
Event Actor.OnCombatStateChanged(Actor akSender, Actor akTarget, int aeCombatState)
Debug.Notification("Changed combat state.")
EndEvent
Function Scan10Meters()
FoundActors = Game.GetPlayer().FindAllReferencesWithKeyword(ActorTypeNPC, 800.0)
Debug.Notification("Actors: " + FoundActors[0] + "Distance: " + FoundActors[0].GetPositionX())
endFunction
Nothing really touches the Scan10Meters() function. Everything else is HUDFramework stuff, which doesn't do anything currently (haven't added my .swf file yet).