Jump to content

xcafe

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by xcafe

  1. The script I'm trying to write is this: Scriptname BardSpellScript extends ActiveMagicEffect CentralListScript Property CentralQuest Auto Int Property ThisSpell AutoInt Property ThisSpellSound Auto Actor Property PlayerRefEvent OnEffectStart() CentralQuest.BardMagicSound = ThisSpellSound CentralQuest.BardSpell = ThisSpell CentralQuest.GoToState("BardCast") EndEventThe compiler errors are these: C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\scripts\source\BardSpellScript.psc(7,0): mismatched input 'Event' expecting FUNCTIONC:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\scripts\source\BardSpellScript.psc(0,0): error while attempting to read script BardSpellScript: Object reference not set to an instance of an object. Why is this happening?
  2. So I'm trying the quest thing, but what event do I use to trigger the register? I can't think of a way to do it short of checking for a variable with OnUpdate, but leaving that on like that would cause major save bloating. EDIT: I tried doing the thing with variable and OnUpdate for now, and it works, but I'm still concerned it'll cause save bloating.
  3. Well the spell is an ability, (of the constant, on self variety) so I think the duration is infinite? And I'll try that quest script idea out! :D
  4. So I have this script, meant to activate an event when it's added to the player, but no dice. Any advice? P.S. The debugs aren't going off or anything either.
  5. So I have this script, meant to activate an event when it's added to the player, but no dice. Any advice? P.S. The debugs aren't going off or anything either.
  6. Its shady because your suggesting people download a random file and register on a site. You also give no reason as to how or why. 10 fps is NOT playable btw. Reduce your mods and or game settings or improve your hardware to get better performance. Do not listen to this guy. ^^^
  7. I found a pretty useful script, but I don't know anything about floats so I don't know how to make it work! Scriptname reregisterscript extends ObjectReference Float fPreviousUpdate Float fUpdateTime = 1.5 Float fMinimumUpdateTime = 0.1 Int iCounter Event OnSomeEvent() ;The first time that you register for an update fPreviousUpdate = Utility.GetCurrentGameTime() RegisterForSingleUpdateGameTime(fUpdateTimer) EndEvent Event OnUpdateGameTime() Float fCurrentTime = Utility.GetCurrentGameTime() Float fNumUpdates = (fCurrentTime - fPreviousUpdate) * 24 / fUpdateTimer Int iNumUpdates = Math.Floor(fNumUpdates) If(iNumUpdates > 0) iCounter += 1 * iNumUpdates Else iCounter += 1 EndIf fPreviousUpdate = fCurrentTime Float fRemainingTime = fUpdateTime * (1.0 - (fNumUpdates - (iNumUpdates as Float))) If(fRemainingTime > fMinimumUpdateTime) RegisterForSingleUpdateGameTime(fRemainingTime) Else RegisterForSingleUpdateGameTime(fMinimumUpdateTime) EndIf EndEvent I found it here, http://www.gamesas.com/time-remainder-after-onupdategametime-t371450.html, and tried to compile it, but it brings up a bunch of compiler errors and I know literally nothing about floats so I don't know how to fix them. Here are the errors, for reference: C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(16,24): required (...)+ loop did not match anything at input 'iCounter' C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(17,9): required (...)+ loop did not match anything at input 'iCounter' C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(23,12): required (...)+ loop did not match anything at input 'RegisterForSingleUpdateGameTime'
  8. Ok so I think I figured out what the problem is! Apparently waiting actually messes up the registerforupdategametime function, so I'm going to try and reduce it to something that I won't have to wait through to see if that is the problem. In the meantime, is there a way of getting something like this to work? Scriptname reregisterscript extends ObjectReference Float fPreviousUpdateFloat fUpdateTime = 1.5 Float fMinimumUpdateTime = 0.1 Int iCounter Event OnSomeEvent() ;The first time that you register for an update fPreviousUpdate = Utility.GetCurrentGameTime() RegisterForSingleUpdateGameTime(fUpdateTimer) EndEvent Event OnUpdateGameTime() Float fCurrentTime = Utility.GetCurrentGameTime() Float fNumUpdates = (fCurrentTime - fPreviousUpdate) * 24 / fUpdateTimer Int iNumUpdates = Math.Floor(fNumUpdates) If(iNumUpdates > 0) iCounter += 1 * iNumUpdates Else iCounter += 1 EndIf fPreviousUpdate = fCurrentTime Float fRemainingTime = fUpdateTime * (1.0 - (fNumUpdates - (iNumUpdates as Float))) If(fRemainingTime > fMinimumUpdateTime) RegisterForSingleUpdateGameTime(fRemainingTime) Else RegisterForSingleUpdateGameTime(fMinimumUpdateTime) EndIf EndEvent I found it here, http://www.gamesas.com/time-remainder-after-onupdategametime-t371450.html, and tried to compile it, but it brings up a bunch of compiler errors and I know literally nothing about floats so I don't know how to fix them. Here are the errors, for reference: C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(2,39): required (...)+ loop did not match anything at input '=' C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(2,6): Unknown user flag fUpdateTime C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(15,24): required (...)+ loop did not match anything at input 'iCounter' C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(16,9): required (...)+ loop did not match anything at input 'iCounter' C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\source\reregisterscript.psc(22,12): required (...)+ loop did not match anything at input 'RegisterForSingleUpdateGameTime'
  9. But...then the GoToState("") line will be part of an event that's already in that state? If I don't put the line in the place that I did, will the onupdate event ever happen?
  10. I'm not sure I understood what you were suggesting. Did you mean something like this? State Studied Event OnBeginState() NotStudied = false Debug.Notification("State 'Studied' Entered") RegisterForSingleUpdateGameTime(24.0) Debug.Notification("Registered for update(24)") GoToState("") EndEvent EndState Event OnUpdateGameTime() Int ListSize = CentralQuest.GSL.GetSize() Int Index = 0 While Index < ListSize Form Entry = CentralQuest.GSL.GetAt(Index) If (Entry as Spell) PlayerRef.RemoveSpell(Entry as Spell) EndIf Index += 1 EndWhile EndEvent
  11. Title says it all, I have a RegisterForSingleUpdateGameTime function set for 24.0 (24 skyrim hours) and an OnUpdateGameTime event, but the event is never being called. P.S. The debugs after the Register function are going off, but not the one in the Update event.
  12. Title says it all, I have a RegisterForSingleUpdateGameTime function set for 24.0 (24 skyrim hours) and an OnUpdateGameTime event, but the event is never being called. P.S. The debugs after the Register function are going off, but not the one in the Update event.
  13. So this isn't working again, and I don't know why! Basically, I have it set up like this: This here is part of a larger script attached to spelltomes, but this part is the part that adds the spells in the tomes to the formlist. Then my script, here, calls the formlist and uses the function from this post to add the spells to the player. Except that it's not doing that. It adds the spell that I have manually added into the formlist through the CK, but none of the ones it should be adding from the tomes. To clarify, it is being called, as all the debugs are going off, it just isn't working. In addition, the function to remove the spells also isn't working. Here's the script for that: It's not even removing the spell that's manually added in the formlist, I don't know what the deal is. Here's the full script, for reference:
  14. So this isn't working again, and I don't know why! Basically, I have it set up like this: This here is part of a larger script attached to spelltomes, but this part is the part that adds the spells in the tomes to the formlist. Then my script, here, calls the formlist and uses the function from this post to add the spells to the player. Except that it's not doing that. It adds the spell that I have manually added into the formlist through the CK, but none of the ones it should be adding from the tomes. To clarify, it is being called, as all the debugs are going off, it just isn't working. In addition, the function to remove the spells also isn't working. Here's the script for that: It's not even removing the spell that's manually added in the formlist, I don't know what the deal is. Here's the full script, for reference:
  15. Hm, so I replaced the playidles with the sendanimation events, and now it doesn't play any animations at all. :sad: EDIT: So I looked in the CK, and the animation event for the sitting/reading idle is ChairReadingStart (IIRC) but how do I define that? Not in an idle property, since it's not an idle, so how? EDIT EDIT: Aha! I forgot the quotation marks, it works perfectly! Thank you!
  16. Oki doki, I'll try that out! And thank you for lending me your full arm ;) Oh and the centralquest thing is a quest property with a script that this script relies on attached :laugh:
  17. 1 and 2 definitely yes, I have no idea how you would go about the rest of those.
  18. Well that didn't work :( At least now it seems to be running through the rest of the script, although another part of it isn't working quite right. This is throwing up all the debugs but not adding the spells!
  19. OMG fore! #celebrity :laugh: Thanks, I'll try that right away!
  20. Maybe, but the debug still fires, so wouldn't that not be it? EDIT: Wow that totally ended up being it, boy do I feel dumb :laugh: EDIT EDIT: Wait nope, the player controls are being enabled, but the animation still isn't stopping, and the part of the script that comes after that isn't firing either. :(
  21. Hi nexus! So, I'm trying to make a mod that, as far as I know, has never really been done before. (My first mistake, shoulda just made a booby follower, smh.) But since I don't have a whole lot of material to reference, I'm running in to some problems. For example, this animation. Game.DisablePlayerControls(True, True, True, False, True, True, True, True) Game.ForceThirdPerson() playerref.PlayIdle(IdleChairRead) Utility.Wait(5) ; sets when studying will be complete Debug.Notification("wait complete") playerref.PlayIdle(IdleChairRead) Debug.Notification("animation sent") Game.EnablePlayerControls() This is part of a larger script, and the whole thing works fine up until the second PlayIdle is called. The animation I have the property set to should be a looped animation (I'm like 90% sure it is) which would mean that if you played it a second time, it would stop. It's not doing that though. And I've tried replacing the second playidle with other idles, like the idlestop_loose idle that some other mods use, but no dice. For example, here's a script where the animation works perfectly: Game.DisablePlayerControls(True, True, True, False, True, True, True, True) PlayerREF.UnequipItem(DDDMyLute, false, true) DDDplayLuteText.Show() Game.ForceThirdPerson() debug.SetGodMode(true) Utility.wait(2.0) PlayerREF.playidle (IdleLuteStart) Utility.wait(0.5) MUSCategory.mute() Utility.wait(0.5) DDDplaylutesound.Play(PlayerREF) Utility.wait(31.0) PlayerREF.playidle (IdleStop_Loose) Utility.wait(1.0) MUSCategory.unmute() Game.EnablePlayerControls() debug.SetGodMode(False) This is basically the same thing I have, so how come mine doesn't work? P.S. My script compiles just fine, and the debug after the second playidle function also works. :psyduck:
  22. If you're using clothes with meshes designed for a body mod you don't have, the clothes thing might happen. Idk about dawnstar but you could check what object that is.
  23. So I've isolated the problem! Not sure how to fix it, or what's causing it, but at least I know what's actually happening now. That OnUpdateGameTime event is just never happening! I don't know how to fix this, do any of you?
×
×
  • Create New...