Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

Fixed it. Woopsie.

 

The questions I had above still stand tho =p.

It is difficult to do what you want because the two functions don't take in account for buffs and GetActorValuePercentage is broken.

 

 

False, I just did it.

 

Here:

Scriptname Athletics extends ObjectReference  

Actor Property PlayerRef auto

Float Property StaminaRef auto
Float Property XRef auto

Import FISSFactory

Function CheckFISS()
FISSInterface fiss = FISSFactory.getFISS()
If !fiss
debug.MessageBox("FISS not installed. It'll take longer to increase your stats each time you load up a save game.")
else
debug.Notification("Values have been loaded.")
endif
EndFunction


Float Function MySaveFunction()
FISSInterface fiss = FISSFactory.getFISS()
fiss.beginSave("Athlete","Athletics")
fiss.saveFloat("RememberX",XRef)
string saveResult = fiss.endSave()
EndFunction

Float Function MyLoadFunction()
FISSInterface fiss = FISSFactory.getFISS()
fiss.beginLoad("Athlete")
XRef=Fiss.loadFloat("RememberX")
string loadResult = fiss.endLoad()
EndFunction

Float Function MySaveFunction2()
FISSInterface fiss = FISSFactory.getFISS()
fiss.beginSave("Athlete","Athletics")
fiss.saveFloat("RememberY",YRef)
string saveResult = fiss.endSave()
EndFunction

Float Function MyLoadFunction2()
FISSInterface fiss = FISSFactory.getFISS()
fiss.beginLoad("Athlete")
XRef=Fiss.loadFloat("RememberY")
string loadResult = fiss.endLoad()
EndFunction

Float count
Float check

Float Property YRef auto
Float Property MagickaRef auto

Event oninit()

CheckFISS()

while PlayerRef.GetActorValue("Stamina")<=PlayerRef.GetBaseActorValue("Stamina") || PlayerRef.GetActorValue("Magicka")<=PlayerRef.GetBaseActorValue("Magicka")

if PlayerRef.GetActorValue("Stamina")<StaminaRef
XRef = XRef + (StaminaRef-PlayerRef.GetActorValue("Stamina"))
StaminaRef = PlayerRef.GetActorValue("Stamina")
MySaveFunction()
endif

if PlayerRef.GetActorValue("Magicka")<MagickaRef
YRef = YRef + (MagickaRef-PlayerRef.GetActorValue("Magicka"))
MagickaRef = PlayerRef.GetActorValue("Magicka")
MySaveFunction2()
endif

if StaminaRef<PlayerRef.GetActorValue("Stamina")
StaminaRef = PlayerRef.GetActorValue("Stamina")
endif

if MagickaRef<PlayerRef.GetActorValue("Magicka")
MagickaRef = PlayerRef.GetActorValue("Magicka")
endif

if XRef>PlayerRef.GetLevel()*100+50
PlayerRef.SetActorValue("Stamina",PlayerRef.GetBaseActorValue("Stamina")+PlayerRef.GetLevel()*3)
Debug.Notification("I am feeling stronger.")
XRef=1
endif

if YRef>PlayerRef.GetLevel()*100
PlayerRef.SetActorValue("Magicka",PlayerRef.GetBaseActorValue("Magicka")+PlayerRef.GetLevel()*6)
Debug.Notification("I feel a power growing deep within.")
YRef=1
endif

endwhile

endevent

Event OnPlayerLoadGame()

CheckFISS()
MyLoadFunction()
MyLoadFunction2()

while PlayerRef.GetActorValue("Stamina")<=PlayerRef.GetBaseActorValue("Stamina") || PlayerRef.GetActorValue("Magicka")<=PlayerRef.GetBaseActorValue("Magicka")

if PlayerRef.GetActorValue("Stamina")<StaminaRef
XRef = XRef + (StaminaRef-PlayerRef.GetActorValue("Stamina"))
StaminaRef = PlayerRef.GetActorValue("Stamina")
MySaveFunction()
endif

if PlayerRef.GetActorValue("Magicka")<MagickaRef
YRef = YRef + (MagickaRef-PlayerRef.GetActorValue("Magicka"))
MagickaRef = PlayerRef.GetActorValue("Magicka")
MySaveFunction2()
endif

if StaminaRef<PlayerRef.GetActorValue("Stamina")
StaminaRef = PlayerRef.GetActorValue("Stamina")
endif

if MagickaRef<PlayerRef.GetActorValue("Magicka")
MagickaRef = PlayerRef.GetActorValue("Magicka")
endif

if XRef>PlayerRef.GetLevel()*100+50
PlayerRef.SetActorValue("Stamina",PlayerRef.GetBaseActorValue("Stamina")+PlayerRef.GetLevel()*3)
Debug.Notification("I am feeling stronger.")
XRef=1
endif

if YRef>PlayerRef.GetLevel()*100
PlayerRef.SetActorValue("Magicka",PlayerRef.GetBaseActorValue("Magicka")+PlayerRef.GetLevel()*6)
Debug.Notification("I feel a power growing deep within.")
YRef=1
endif

endwhile

endevent

Now, does anyone know how can I check if the spell I am casting is a concentration spell or not?

Edited by Kerberus14
Link to comment
Share on other sites

Can anyone give me the link to the CK where all the sourcetypes are? I have been searching for it for almost 1 hour and I haven't found it.

Closest I got was this:

http://www.creationkit.com/GetWeaponType_-_Weapon

http://www.creationkit.com/GetEquippedItemType_-_Actor

 

Is this the one you're looking for?

 

http://www.creationkit.com/Category:Script_Objects

Link to comment
Share on other sites

 

Can anyone give me the link to the CK where all the sourcetypes are? I have been searching for it for almost 1 hour and I haven't found it.

Closest I got was this:

http://www.creationkit.com/GetWeaponType_-_Weapon

http://www.creationkit.com/GetEquippedItemType_-_Actor

 

Is this the one you're looking for?

 

http://www.creationkit.com/Category:Script_Objects

 

I'm looking for the one where it explains what these lines are:

sourceType==20

sourceType==24

Link to comment
Share on other sites

If I have a never ending package (sandbox in this case) in a scene, in phase 4, and then I put a wait timer of 7 seconds extending from Phase 4 to Phase 4 there, will the phase complete when the timer ends?

 

Or do I have to use some other means to complete the phase, like completion conditions? If so, should I just set a variable and then reference that variable as a completion condition, or is there a way to SetPhase/AdvancePhase?

Link to comment
Share on other sites

How can I add a perk to any non-player character via Papyrus?

When the Player character enters a new cell, I want to scan for all the NPC's in that cell and add abilities to them if conditions are met.

 

And how can I check if a spell is a concentrated spell?

Edited by Kerberus14
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...