Jump to content

Fliteska

Premium Member
  • Posts

    2
  • Joined

  • Last visited

Nexus Mods Profile

About Fliteska

Profile Fields

  • Country
    United Kingdom

Fliteska's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Will give that a go, I did try it without the Const assignment but no luck. Had a feeling it might be the fact it was a Property that was passed into the script rather than something made inside of the script. Edit: Thanks very much, that sorted the problem
  2. I've made 2 scripts, one is a quest to hold some data, the other is object reference just to add data to the quest... I can't seem to figure out what is wrong with the following code but my BuiltInstances array length doesn't change when I add an item into it. The notifications appear but just says Length = 0. Everything compiles fine, but can't figure out whats wrong... any ideas? ScriptName TeleporterManagerScript extends Quest ObjectReference[] Property BuiltInstances Auto Const Function Add(ObjectReference akRef) BuiltInstances.Add(akRef) Debug.Notification("Adding... Length = " + BuiltInstances.Length)EndFunction Function Remove(ObjectReference akRef) Debug.Notification("Removing... Length = " + BuiltInstances.Length) int i = BuiltInstances.Find(akRef) If (i >= 0) BuiltInstances.Remove(i) EndIfEndFunction Function Teleport() If (BuiltInstances.Length > 0) Debug.Notification("Teleport") int rInt = Utility.RandomInt(0, BuiltInstances.Length) Game.GetPlayer().MoveTo(BuiltInstances[rInt]) EndIfEndFunction Scriptname TeleporterActionScript extends ObjectReference TeleporterManagerScript property ManagerEffect auto const Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ManagerEffect.Teleport() EndIfEndEvent Event OnWorkshopObjectPlaced(ObjectReference akRef) ManagerEffect.Add(akRef)EndEvent Event OnWorkshopObjectDestroyed(ObjectReference akRef) ManagerEffect.Remove(akRef)EndEvent
×
×
  • Create New...