-
Posts
306 -
Joined
-
Last visited
Everything posted by Kerberus14
-
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?
-
I can't remember it, ahh, I remember the lines. sourceType==20 sourceType==24 and so on, I want those because they can tell if a spell is a concentration spell.
-
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
-
Fixed it. Woopsie. The questions I had above still stand tho =p.
-
So.. nobody knows? :<
-
Scriptname TrainingFormula extends ObjectReference Actor Property PlayerRef auto float count Event oninit() count = 0 while PlayerRef.GetActorValue("Stamina")<=PlayerRef.GetBaseActorValue("Stamina") if count==0 float y=PlayerRef.GetBaseActorValue("Stamina") float x = 1 count=1 endif if PlayerRef.GetActorValue("Stamina")<y float x = x + (y-PlayerRef.GetActorValue("Stamina")) float y = PlayerRef.GetActorValue("Stamina") endif if y<PlayerRef.GetActorValue("Stamina") float y = PlayerRef.GetActorValue("Stamina") endif if x>PlayerRef.GetLevel()*100 PlayerRef.SetActorValue("Stamina",PlayerRef.GetBaseActorValue("Stamina")+2) float x = 1 endif endwhile endeventHow can I make this work correctly? Explanation: When I lose stamina, I want the lost value to be recorded inside a variable, making it add up every time it does that. When that variable goes over a certain value some other variable will be changed. and 2. How can I find out what NPC's are in a certain Encounter Zone? For example, I want to know what NPC's are in the below Encounter Zone. http://i.gyazo.com/84f76d7b397ead4b20f74b2f82b90a27.png
-
Not with HasKeyword, it has to be WornHasKeyword.
-
Was hoping to be a way to do it with conditions.. http://i.gyazo.com/6da1c3a9f24f10d065c4ac45bb48d5e2.png
-
How can you check if the player is jumping?
-
How do I do that? lol
-
http://i.gyazo.com/3aecc813b45217f262535a9ea91a5d53.png I want to know if the power is equipped as a voice, and if it is, and it is casted, then add xp to speechcraft. OR If the type of the spell that is equipped is a Voice Power, and if it is, and it is casted, then add xp to speechcraft.
-
http://www.creationkit.com/Equip_Type How can I check in Papyrus the equip type for a weapon or spell that I have equipped?
-
If healrate mult is 1 and healrate is 5 while you have 100 max health, how much healt per second do you get?
-
Thank you, that's what I was looking for. if 5 Healrate with 1 HealRateMult is 5% of Health BaseActorValue. (5 health per second out of 100 maximum health?, that doesn't seem to be the case when I change those two values.. It is more like 1 health per 5 seconds)
-
How do these things work? Healrate StaminaRate MagickaRate When I input a value to them(lets say 5) and their respective Multipliers are set to 1(NORMAL, supposedly), you would regen 500% or 50% of a BaseActorValue? What is the formula?
-
Where can I edit the attributes of the player? Things like HP Regen, Combat Regen and so on. http://static-2.nexusmods.com/15/mods/110/images/33395-1-1366419824.png
-
O_o that is completely different from a C++ standpoint where I come from. Thank you papyrus gods for explaining my faulty logic. I bow down to you in shame and hope that one day I will be a god of twisted logics!
-
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked ) count=count+1 if PlayerRef.GetRace()!=NordRaceVampire || PlayerRef.GetRace()!=ArgonianRaceVampire || PlayerRef.GetRace()!=BretonRaceVampire || PlayerRef.GetRace()!=DarkElfRaceVampire || PlayerRef.GetRace()!=HighElfRaceVampire || PlayerRef.GetRace()!=ImperialRaceVampire || PlayerRef.GetRace()!=KhajitRaceVampire || PlayerRef.GetRace()!=RedguardRaceVampire || PlayerRef.GetRace()!=WoodElfRaceVampire|| PlayerRef.GetRace()!=OrcRaceVampire || PlayerRef.GetRace()!= ElderRaceVampire if count == 5 PlayerRef.RestoreActorValue("Health",PlayerRef.GetBaseActorValue("Health")/100*10) count=0 endif endif endeventThis event keeps happening EVEN if I change race to a vampire and it really ticks me off, I can't figure out WHY it does that, the script is attached directly to the player. The condition is clear too, logical to me, if you are that race then that IF should NOT happen, YET IT STILL DOES.
-
I'm trying to implement a second health bar.. I want that bar to take damage before the health bar does.. if onhit does not work properly either, then I have no other events to use.. lol
-
The objectReference is the Player. So I'm stuck to only using OnHit? :<
-
scriptname Barrier extends ObjectReference Actor Property PlayerRef auto float playerbarrier float currenthealth Event OnCombatStateChanged(Actor akTarget, int aeCombatState) currenthealth = PlayerRef.GetActorValue("Health") if aeCombatState==1 playerbarrier=PlayerRef.GetBaseActorValue("Health")/100*50 debug.messagebox(playerbarrier) else playerbarrier=0 endif endevent Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) if playerbarrier>0 && PlayerRef.GetActorValue("Health") < currenthealth debug.messagebox(playerbarrier) PlayerRef.RestoreActorValue("Health",currenthealth-PlayerRef.GetActorValue("Health")) playerbarrier= playerbarrier - (currenthealth - PlayerRef.GetActorValue("Health")) endif endevent This script does not run at all.
-
I BELIEVE you can just do: Game.GetPlayer().SetEssential(true) Inside an event. I've not tested it though. :wink: SetEssential is not a function or does not exist
-
I want to toggle immortal mode in a script for the player character. How do I do that?
-
Same. Barrier.psc(0,0): unable to locate script SKI_MeterWidget
-
There's not really a tutorial out there, persay. Use SkyUI to make your widget. There's a little bit of documentation here: https://github.com/schlangster/skyui/wiki/Mardoxx_Sandbox You can use Frostfall as an example. Barrier.psc(0,0): unable to locate script SKI_MeterWidget I have SkyUI Latest Version installed, and it still doesn't find that script.