Jump to content


  • Posts

  • Joined

  • Last visited

Nexus Mods Profile

About madmatty946

madmatty946's Achievements


Rookie (2/14)



  1. Could you maybe pinpoint where you think my code has a performance issue? Because the loop goes through O(10) entries and adds up numbers, I don't see why this should take minutes to run. Also, the notification in the first line of the script shows up only after minutes so it seems like the script doesn't event start until quite a while has passed. I honestly don't see where these 10 lines of code should have any performance issues.
  2. Actually I found out that the script DOES execute, only it takes a VERY long time (multiple minutes) until it does. I am still stumped as to what the problem is, I have opened this thread here.
  3. Hi, I am trying to do the following: * Make an object that can be built in workshop mode and that adds a menu to the workshop terminal if it is hooked up. This works. * When the menu item is clicked on the linked terminal, loop through all workshops and check how many items of a certain type exist in all workshops. * Display the number as a notification. My script compiles but when I exectue the menu point in the terminal nothing happens. Then, after a long time (like sleeping in a bed, leaving the settlement etc) it executes. Can someone explain what's wrong? Here is my script fragment: WorkshopScript[] allWorkshops = WorkshopParent.Workshops as WorkshopScript[] debug.notification("Starting script.") int total = 0 int i = 0 int ccount = 0 while (i < allWorkshops.Length) WorkshopScript curWS = allWorkshops[i] ;how many items are stored here? ccount = curWS.GetItemCount(Item) ;add number to the total count total += ccount i+=1 endWhile debug.notification("Total number is " + total) Game.GetPlayer().AddItem(Item,1)
  4. I have exactly the same problem. Did you figure out a solution?
  5. Thanks! This would be how I attach the quest script to the object, that I will call object A. Now I want to have an object B (that can be built from the workbench) that has a script attached to it and I want the script attached to object B access the properties of object A. How would this work now? Am I overlooking something really simple?
  6. Hi, I'm fairly experienced in programming but very new to FO4 modding and Papyrus. So here is my question: What is the best way to get an ObjectReference from an object that is placed somewhere in the map? In some way I imagine the reference of the target should be stored globally in some variable, but how do I do this? As far as I understand, you would use a quest for that that keeps running and just attach the object reference to the quest? But how is this done? And how does my script get the reference to the quest? I'm confused.
  • Create New...