Jump to content

GRock84

Supporter
  • Posts

    13
  • Joined

  • Last visited

Nexus Mods Profile

About GRock84

GRock84's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. Thank you all for the responses. I have updated my script to use OnMenuItemRun as shavkacagarikia suggested. It works great! But now I have uncovered another problem. When I try to display the value of my global var with "debug.notification" it literally returns "GlobalVariable". :huh: Possibly more, but I think there is a character limit or something. I'm not entirely sure. Function check_player_hp() float BaseEnd = (Game.GetPlayer().GetBaseValue(Endurance)) int playerlevel = Game.GetPlayer().GetLevel() float CurBasePlayerHealth = (Game.GetPlayer().GetValue(Health)) float FixedBasePlayerHealth = (80 + (BaseEnd * 5) + (playerlevel - 1) * (BaseEnd/2 + 2.5)) if (CurBasePlayerHealth == FixedBasePlayerHealth) Player_Health_Broken.SetValue(2) Debug.Notification("Player HP is OK. current: " + CurBasePlayerHealth as int + " expected: " + FixedBasePlayerHealth as int + " Player_Health_Broken: " + Player_Health_Broken) ; <--- this is where things get weird... else Player_Health_Broken.SetValue(1) Debug.Notification("Player HP is not OK. current: " + CurBasePlayerHealth as int + " expected: " + FixedBasePlayerHealth as int + " Player_Health_Broken: " + Player_Health_Broken) endif EndFunction GlobalVariable Property Player_Health_Broken Auto This is how it is declared in script.
  2. Why is this a thing?? Whenever I try to add a new property the "const" box is checked and greyed out. I have a script that needs to get the value of and set a global variable in order for certain other features to work. I have tried deleting the fragment and moving the script elsewhere out of the folder, renaming the script, everything I can think of. Is there a file I can edit to change this or another way to get the value of a global variable AND be able to set it? I searched the wiki and the internet to see if terminal properties are just supposed to be constant but nothing I can find says that. I get the feeling I've messed up a while back and just now realizing it, but I can't for the life of me figure out where I went wrong. Any advice would be greatly appreciated! Scriptname GlitchBusterHoloMenuPlayerHP Extends Terminal Hidden ;BEGIN FRAGMENT Fragment_Terminal_01 Function Fragment_Terminal_01(ObjectReference akTerminalRef) ;BEGIN CODE Self.check_player_hp() ;END CODE EndFunction ;END FRAGMENT ;BEGIN FRAGMENT Fragment_Terminal_02 Function Fragment_Terminal_02(ObjectReference akTerminalRef) ;BEGIN CODE Self.fix_player_hp() ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Function check_player_hp() float BaseEnd = (Game.GetPlayer().GetBaseValue("Endurance")) int playerlevel = Game.GetPlayer().GetLevel() float CurBasePlayerHealth = (Game.GetPlayer().GetValue("Health")) float FixedBasePlayerHealth = (80 + (BaseEnd * 5) + (playerlevel - 1) * (BaseEnd/2 + 2.5)) if CurBasePlayerHealth == FixedBasePlayerHealth Player_Health_Broken.SetValue(2) Debug.Notification("Player HP is OK. current: " + CurBasePlayerHealth as int + " expected: " + FixedBasePlayerHealth as int) else Player_Health_Broken.SetValue(1) Debug.Notification("Player HP is not OK. current: " + CurBasePlayerHealth as int + " expected: " + FixedBasePlayerHealth as int) endif EndFunction Function fix_player_hp() float CurBasePlayerHealth = (Game.GetPlayer().GetValue("Health")) float BaseEnd = (Game.GetPlayer().GetBaseValue("Endurance")) int playerlevel = Game.GetPlayer().GetLevel() float FixedBasePlayerHealth = (80 + (BaseEnd * 5) + (playerlevel - 1) * (BaseEnd/2 + 2.5)) Game.GetPlayer().SetValue(PlayerHealth, FixedBasePlayerHealth) float CurBasePlayerHealth2 = (Game.GetPlayer().GetValue("Health")) Debug.Notification("Player HP is fixed. current: " + CurBasePlayerHealth2 as int + " expected: " + FixedBasePlayerHealth as int) EndFunction GlobalVariable Property Player_Health_Broken Auto Const ;<--- this needs can't be constantEdited: Ugh... sorry for the duplicate posts... stupid internet....
  3. Should I set the condition for all effects or just one? Also I noticed the debug message never pops up.
  4. finally got the script to subtract a dragon soul everytime it was cast but once the soul count reaches 0 you are still able to cast it. I need the spell to be disabled if you dont have any souls left. here is the tweaked code: MagicEffect Property Player Auto Event OnEffectStart(Actor akTarget, Actor akActor) if Game.GetPlayer().GetAV("DragonSouls") > 0 Game.GetPlayer().ModAV("DragonSouls",-1) else Debug.Notification("Spell requires a Dragon Soul.") endIf endEvent how do I make it so the spell does not cast if the player is out of souls?
  5. so here is what i got for the script so far and now i cant get it to compile... I know it has something to do with referencing the player or something but im not sure how to do that. Scriptname removePCdragonsoul extends activemagiceffect {removes dragon souls when Dovahkiin Suleyk spell is cast} MagicEffect Property Player Auto Event OnEffectStart(Actor akTarget, Actor akActor) if akActor.GetAv("DragonSouls") > 0 Player.ModAv("DragonSouls",-1) else Debug.Notification("Spell requires a Dragon Soul.") endIf endEvent and this is the error I get: \removePCdragonsoul.psc(8,15): ModAv is not a function or does not exist
  6. nevermind fixed it lol had to state a magic skill in all the magic effects of the spell. tested the spell in game and everything ran fine but the script didnt run. so to clarify, I add the script to the magic effect in the papyrus script section. but im not entirely sure what I should select as the property object? I add the script here --> Here and this is the property window --> Here what do I pick as the object? edit: fixed links.... edit2: also i want to add the dragon aspect glow effect with maybe some custom bound armor. cool? good idea? maybe too cheesy?
  7. I knew it was gonna be stupid simple and I was over thinking it. Thanks man
  8. made a custom spell for a mod that i am currently working on. when I add it to my player in game via spell tome or console command is says it was added but its not there when I look to equip it. the spell has some 27 effects (excessive? yes but kinda important to the mod) no scripts (yet). any suggestions?
  9. Thanks so much for your reply. I added you script in but i ran into another issue that is not related to your script at all. When i add the spell to my character either by spell tome or console command, i get the 'spell learned' message but the spell is nowhere to be seen in my magic section. I am certain it has nothing to do with the script as removing it had no effect as did removing the conditions. so i have been unable to test the spell. perhaps its because I have too many magic effects added to this one spell? Is there a limit? I have 27 lol
  10. Hi there! I'm currrently working on a spell or shout (havent decided yet most likely shout) that will use dragons souls in place of magika to provide enhanced abilities (Super Dovahkiin Mode if you will), sorta like vampire or werewolf forms but more temporary (60 secs) and more positive abilities instead of weaknesses (ie weakness to sun light etc). In other words when you use the spell or shout it cost 1 dragon soul each time you use it.. I'm almost certain this will require a script of some sort. I am quite new to scripting in the creation kit so I was hoping someone could give me an idea of what such a script would look like or at least a good place to start or maybe even alternative way to accomplish this goal. thanks
  11. DUDE!! Thats awesome! its gonna take me some time to figure out how to tweak it to my idea but its exactly what im looking for! Thanks! I havent the slightest clue as to where to start yet but should be fun nonetheless.
  12. im trying to create a spell or script that locks onto a target, preferably using the cross hairs, and then follow that target until impact. i want it to be fire and forget so that you dont have to maintain line of sight until impact. kinda like and heat seeking or homing missile. im pretty new to papyrus and if anyone can point me in the right direction or get me started that would be awesome! and please be a little more specific than "try the creation kit wiki". thats a pretty big site and a lot of their explanations are rather vague (which considering the possibilities for each variable, property or object i can see why). i dont need or want anyone to do this for me, so its not a mod request. i just want some help with getting this started. i really want to learn about this stuff from a hands on standpoint. thanks in advance!
×
×
  • Create New...