Jump to content
⚠ Known Issue: Media on User Profiles ×

tsdobbi

Members
  • Posts

    46
  • Joined

  • Last visited

Nexus Mods Profile

About tsdobbi

Profile Fields

  • Country
    United States

tsdobbi's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator Rare
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. So yeah, for my purposes I am just duplicating existing cells. I have no intention of actually modifying their appearance, save for disabling the functionality of the doors etc. The only intention of this is so they player and NPC have a private location to do battle. (basically player and NPC agree to fight to the death, the premise is the go to a private location to fight I teleport them there when combat is agreed, then teleport the player back to the starting location when the fight is over.) I more or less just wanted to make sure deleting any quest related stuff etc. in the duplicate wasn't impacting the quest since it was shooting out warnings at me when deleting the stuff in the CK. In at least one case I confirmed it isn't (I use a duplicate the Markarth Warrens as one of the locations) and did the quest and didn't see any unwanted side effects.
  2. I agree with you I (hope) that the change to the script in a save where it was already introduced was the cause. (Mainly because as far as I understand it, I use register for single update correctly in this case). Quick Q, if you have this level of understanding of it, just trying to understand how the updates work. 1. As far as I understand it, you should ALWAYS use register for single update where possible. 2. As far as running the first update from "OnInit". I assume this runs every time the game loads. So my question is, I load the game and save a few minutes later. There was an update registered (and it was in the process of waiting for the count to tick down). When I load the save again, onInit registering an update when you load into the game as I understand. So the update that was registered before the save, is that still there and running in parallel to the new registered update from onInit when I loaded the game? In summary, would constantly loading and making new saves be propagating registered updates running in parallel or can there only every be one running for a specific script with registerForSingleUpdate. (i.e. should "checking" if an update is already registered be something we do here? I want to know if what I am doing is considered bad practice.
  3. I didn't change the properties at all (I just double checked them in the CK to make sure they were correct). All I did was change the registerForSingleUpdate from 1200 to 30 and added a debugMessageBox so I knew when it triggered. So I did a few tests: 1. New Game - Script is executing as expected. 2. reloaded a save (a couple of saves after I added this script) again functioning as intended (even with the change to 30 second updates and adding the debug box) its triggering an update every 30 seconds. 3. any more recent save. It's totally screwed and constantly firing updates and not reporting the correct value for the player having the perk. I get that the "orginal script" may be baked into the save, but the behavior of the script at this point is making zero sense even in that regard. i.e. I don't think the change to the update seconds and adding the debug box caused this problem. I think it revealed a problem. (because I loaded an earlier save, that already had the script loaded, with those same changes and it didn't cause the same behavior, only recent saves display this behavior). I think one further test I am going to do is to load a new game and just let it run for like 3-4 hours with debug notifications and see if at any point it just starts spamming notifications indicating its in the broken state I was seeing.
  4. Basically this on update should fire every 1200 seconds. i.e. it should be onInit update will fire in 1200 seconds. update fires (performs logic) registers for another single update in another 1200 seconds. I put a debug message box at the beginning of the update and its literally firing non stop. (I have to literally close the game from task manager because I cant get out of the dialogue box to get to the menu it happens so fast). For reference, the script is attached to an Xmarker I placed. (FYI this script worked fine and wasn't doing that when I initially made the script, the update was firing when it should, confirmed by a debug mbox) I wanted to test a change to the NPC that gets spawned, so I lowered the update time to 30 seconds and thats when I noticed this happening. I'm assuming maybe there is something I don't understand about updates and if "over time" something is breaking. What is also disconcerting is the logic isn't firing correctly either. (i.e. its reporting the player having the perk as false...when it is true). Like I said, literally all I changed since it had been working was the seconds for the registerForSingleUpdate. The whole thing just seems to have imploded for no apparent reason. I have other scripts (attached to NPC's and the Player alias) that use similar functionality and are not breaking like this, and have been running far longer (i.e. OnInit register for single update > do stuff > register for another single update) including using the if(Game.GetPlayer().HasPerk(Perk)) to check if the player has a perk and it's reporting correctly. For some reason this script just stopped working (isn't reporting correct values, executing updates way too fast etc.). Reconfirmed the properties for the script were set up correctly (i.e. the perk is pointing to the right perk). I'm curious if attaching it to the Xmarker is the cause of the issue. Scriptname InitSpawn extends ObjectReference import game import debug import utility import sound event OnInit() RegisterForSingleUpdate(1200) gotoState("waiting") endEvent STATE waiting Event OnUpdate() if(active == false) if(Game.GetPlayer().HasPerk(Perk)) SpawnNPC(NPC) endif endif deadCountUpdate = currentActiveNPC.GetDeadCount() if(deadCountUpdate > deadCount) active = false EndIf RegisterForSingleUpdate(1200) EndEvent endSTATE STATE done endSTATE function SpawnNPC(ActorBase target) currentActiveNPC = target startMarker.PlaceActorAtMe(target,3) active = true deadCount = currentActiveNPC.GetDeadCount() EndFunction
  5. So I am duplicating existing cells and modifying them to save work. Question, some things I try to delete from the duplicated cell freak out about being "used". i.e. if I attempt to delete a patrol path it will give me a warning about it being used. My question is, is it safe to delete things in a duplicated cell. (i.e. can I ignore the fact the CK is telling me something is in use). I'm basically using the cells as essentially, stages almost like in a fighting game. The player and NPC will be transported there for battle. Then the player will be teleported back to their original location. So I am wanting to delete (spawn points, patrol paths etc. Anything that is un-needed).
  6. I duplicated a cell to modify. However, there doesn't seem to be a way to rename it? i.e. right now it is "CellNameDUPLICATE001", there doesn't seem to be anywhere to change this name. NM, I swear I tried this already, but if you click and hold on the name in the cell view list, it lets you refill it.
  7. I got it working, the key was actually to just set the actor to not be able to recover period, and never set it to false and just handle the recovery myself in the script.
  8. Unfortunately, that didn't work. In fact it had the opposite affect. It was causing the player to instantly recover every time. I wonder if it has something to do with the fact I am manually restoring the players health and not letting the bleedOut run its course.
  9. Thanks. I saw that before, but wasn't clear on what exactly it did.
  10. What I ended up doing was just writing a script to spawn them using a random number generator to make then vary.
  11. I basically have a script, for a start (i intend to do other things with it). I am just seeing some weird behavior. So setting the PC to essential. When the PC gets their health knocked to 0 and triggers the OnEnterBleedOut() I fade the screen to black, wait 20 seconds then fade back in and heal the player character to 100 to bring them out of bleed out. Event OnEnterBleedout() Game.DisablePlayerControls() FadeToBlackAndHold() Utility.Wait(20) FadeFromBlack() Game.GetPlayer().RestoreActorValue("health", 100) Game.EnablePlayerControls() endEvent if I load up a game, get myself knocked down, everything works as expected. Player on their knees, fades to black, 20 seconds pass, screen fades back in, players health is restored and they get up and move. The issue is, any subsequent times the player gets knocked down. So if I get knocked out a second time. The Player only falls to their knees for a split second then instantly recovers. (The code in enter bleed out still executes, its just that the player is standing up and at full health the whole time). (I commented out the fade in/fade out to properly observe this ) and sure enough the first time I get knocked out, on my knees till the code finishes. Any subsequent knockouts, my chatacter drops to his knees for a split second then his health is restored and hes up. So i am trying to figure out why after getting knocked down the first time, any subsequent times the player instantly recovers from bleed out.
  12. Ok from what I can see exterior cells reset every 30 days. So a NPC placed in an exterior cell with respawn checked, should respawn 30 days after death. I just wanted to make sure it didn't need to be tied to a respawn zone or something.
  13. To clarify 'LVLVigilantOfStendarr' does have a script attached, but if I look at the use info it is not in any leveled character lists.
  14. If I create an NPC, tick the respawn check box. If I just place it in the world, and it's killed, will it eventually respawn or is there anything else you have to do?
  15. I created a script and attached it to the NPC . With the onInit its basically checking if the player (when the player has a specific perk) is in X range of the npc roughly every second. If the conditions are met the sound plays on the player. (and once the sound plays it wont repeat while the player is still in range, if the player leaves the range and comes back it will play again). Scriptname ImmortalBuzz extends Actor import game import debug import utility import sound event OnInit() RegisterForUpdate(1) gotoState("waiting") endEvent STATE waiting Event OnUpdate() if (Game.GetPlayer().GetDistance(Self) < TriggerDistance) if(Game.GetPlayer().HasPerk(HDRImmortal)) if(playSound == true) PlaySoundEffect(Game.GetPlayer()) playSound = false endif endif Else playSound = true endif if(Self.IsDead()) UnregisterForUpdate() GotoState("done") ; Switch to a state that doesn't use OnUpdate() EndIf EndEvent endSTATE STATE done endSTATE function PlaySoundEffect(Actor target) HDRImmortalBuzz.play(target) EndFunction float Property TriggerDistance = 900.0 Auto Sound property HDRImmortalBuzz auto Perk Property HDRImmortal Auto bool Property playSound = true Auto
×
×
  • Create New...