Jump to content

dylbill

Premium Member
  • Posts

    1493
  • Joined

  • Last visited

Everything posted by dylbill

  1. Hey, this isn't too difficult. Although, I would use Formlists instead of leveled items, and I would make the card pack a book, instead of a misc item, that way you can use the event OnRead(). Here's a script that should work: Scriptname LagruejCardPackScript extends ObjectReference Actor Property pPlayerRef Auto Formlist Property LagruejCommonCards Auto FormList Property LagruejUnCommonCards Auto Formlist Property LagruejRareCards Auto Event OnRead() Int A = Utility.RandomInt(0, (LagruejCommonCards.GetSize() - 1)) Int B = Utility.RandomInt(0, (LagruejCommonCards.GetSize() - 1)) Int C = Utility.RandomInt(0, (LagruejCommonCards.GetSize() - 1)) Int D = Utility.RandomInt(0, (LagruejCommonCards.GetSize() - 1)) Int E = Utility.RandomInt(0, (LagruejUnCommonCards.GetSize() - 1)) Int F = Utility.RandomInt(0, (LagruejUnCommonCards.GetSize() - 1)) Int G = Utility.RandomInt(0, (LagruejRareCards.GetSize() - 1)) pPlayerRef.AddItem((LagruejCommonCards.GetAt(A) as MiscObject), 1) pPlayerRef.AddItem((LagruejCommonCards.GetAt(B) as MiscObject), 1) pPlayerRef.AddItem((LagruejCommonCards.GetAt(C) as MiscObject), 1) pPlayerRef.AddItem((LagruejCommonCards.GetAt(D) as MiscObject), 1) pPlayerRef.AddItem((LagruejUnCommonCards.GetAt(E) as MiscObject), 1) pPlayerRef.AddItem((LagruejUnCommonCards.GetAt(F) as MiscObject), 1) pPlayerRef.AddItem((LagruejRareCards.GetAt(G) as MiscObject), 1) EndEvent Attach this script to your card pack book, and it will run whenever you read the book. Make the formlists and add your cards to them, I assumed they would be misc items. Don't forget to fill properties in the creation kit after attaching the script.
  2. My thoughts exactly, I'll stick with the earlier slightly complex script I posted which works well, and damn the GameDaysPassed glovar. Hey, while I know this thread is really old, 8 years old, I didn't find anywhere else on how to advance game time with papyrus, so I thought I'd share my solution here in case someone else is interested. It was Steve40's comment that advancing the GameHour global variable would actually advance the GameDaysPassed global that got me to a working function: GlobalVariable Property GameHour Auto AdvanceTime(14, GameHour.GetValue()) ;advances time by 2 weeks, keeping the same hour of day at the end. Function AdvanceTime(Int Days, Float Hour) Int I = 0 While I < Days I += 1 GameHour.SetValue(24) ;advances time by 1 day Utility.Wait(0.2) If I >= Days GameHour.SetValue(Hour) ;sets time of day on the last iteration. Endif EndWhile EndFunctionThis will advance the GameDaysPassed GV, keeping the weekday correct.
  3. I know you can use the null texture set in the CK to make things invisible. I've never done it on an actor though.
  4. You should also duplicate the FlameCloakDmg spell and its magic effect. The damage spell is on the cloak magic effect (FireCloakFFSelf) under Assoc. Item 1.
  5. Make sure your cloak spell has the right structure. How cloak spells are set up is a bit tricky. You need two spells to make it work. The actual cloak spell, and the associated damage spell. Your GetIsId condition should be on the damage spell, and not the actual cloak spell. Also, the magnitude of the cloak spell determines how far it reaches. Look at a vanilla cloak spell, like the flame cloak, in the CK to get a better idea of how they're set up.
  6. You could make a new cloak spell and put it on the NPC, with a condition on the associated spell: GetIsID - Player, with the cloak having a very small range, so it only takes effect when the NPC is right next to the player.
  7. Hey, I looked around and didn't see a mod that allows you to do that, but I like the idea so I made it myself. You can find it here
  8. Thanks for the info. Is there unsigned floats in Skyrim? I haven't heard of that. Specifically what I'm trying to do is after using the function GetFormID(), converting the form ID from decimal to hex. The function I wrote is working, but the problem is the float isn't the same as the int ID. As a work around, I'm now casting the int ID as a string, and puting a decimal place in the middle, so that the value is smaller, then doing the same thing and moving the decimal place over again.
  9. I'm encountering a bug where, if I try to cast an integer that's more than 9 digits as a float, the float returns a different value than the integer. Example: Int TestInt = 123456789 Float TestFloat = TestInt as Float The float will return as 123456792.0000 Has anyone else encountered this problem and found a solution? I've tried a number of things already. I've tried casting the int as a string first, then the string as a float. I've tried setting a global variable value to the int I've tried doing Float TestFloat = TestInt * 1 The result is always the same. Any help would be greatly appreciated!
×
×
  • Create New...