Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

if akBaseObject as Potion && akBaseObject.HasKeyword(FOOD) && TimeToEat!=0
Fat=FatGainedDay.GetValue()
CountFood=CountFood+1
Fat=Fat+CountFood
FatGainedDay.SetValue(Fat)
CountFood=0


if TimeToEat!=0
debug.Notification("I still feel a little hungry, I should eat a bit more.")
endif


if TimeToEat==0
debug.Notification("I'm full.")
endif


endif

I want to make this IF run twice, but everytime I call TimeToEat = TimeToEat - 1 I get this error message: SkyEndWeight.psc(37,10): no viable alternative at input 'TimeToEat'.

Edited by Kerberus14
Link to comment
Share on other sites

 

 

 

if akBaseObject as Potion && akBaseObject.HasKeyword(FOOD) && TimeToEat!=0
Fat=FatGainedDay.GetValue()
CountFood=CountFood+1
Fat=Fat+CountFood
FatGainedDay.SetValue(Fat)
CountFood=0


if TimeToEat!=0
debug.Notification("I still feel a little hungry, I should eat a bit more.")
endif


if TimeToEat==0
debug.Notification("I'm full.")
endif


endif

I want to make this IF run twice, but everytime I call TimeToEat = TimeToEat - 1 I get this error message: SkyEndWeight.psc(37,10): no viable alternative at input 'TimeToEat'.

Try TimeToEat -= 1

Link to comment
Share on other sites

 

 

Event OnInit()
PlayerRef.RegisterForMenu("RaceSex Menu")
RegisterForSingleUpdateGameTime(1)
WaterPercentage=100
FoodPercentage=100
EndEvent
Event OnPlayerLoadGame()
PlayerRef.RegisterFormenu("RaceSex Menu")
RegisterForSingleUpdateGameTime(1)
EndEvent
Event OnMenuClose(String MenuName)
Neckdelta=0
PlayerRef.GetActorBase().SetWeight(NeckDelta)
PlayerRef.UpdateWeight(NeckDelta)
EndEvent
Event OnUpdateGameTime()
WaterPercentage-=25
FoodPercentage-=15
Debug.Notification(WaterPercentage)
Debug.MessageBox(FoodPercentage)
if WaterPercentage==75
Debug.Notification("I'm getting thirsty, I should drink something.")
endif
if WaterPercentage==50 && WaterPercentage ==75
Debug.Notification("I'm very thirsty.")
endif
if WaterPercentage==25 && WaterPercentage==50
Debug.Notification("I'm getting dizzy.")
endif
if WaterPercentage==0 && WaterPercentage ==25
Debug.Notification("I'm dying to get some water.")
endif
if FoodPercentage<30
Debug.Notification("I'm hungry.")
endif
RegisterForSingleUpdateGameTime(1)
EndEvent

This goddamn OnUpdateGameTime event won't run at all unless I load a save.. I don't get why.. OnInit doesn't registerforsingleupdategametime
I wait 1 hour in-game and I don't get either a messagebox or a notification..
@ Any way to use this?
Everything I tried failed, : variable facegen is undefined. ColorForm Properties can't be declared in the properties tab, Form Properties only have two options, nothing I can do! wtf
I want to set the hair color of the player to another color..
Edited by Kerberus14
Link to comment
Share on other sites

You can't register for updates in game time until after Helgen. I'm not sure how that translates if you are using an alternate start mod. Check out the wiki page for details on exactly when registering for game times updates kicks in if you think that might be an issue.
Link to comment
Share on other sites

Hi, just wondering if it is possible to change or disable controls via script (normal or SKSE). For excample dismount no longer on E or mouse klick is no longer attack on certain conditions. I'd like to do somethink like:

Event OnKeyDown(Int KeyCode)
    If (condition && KeyCode == Input.GetMappedKey("something"))
          disable(something)
          do my stuff instead
    EndIf
EndEvent
Edited by iwonderif
Link to comment
Share on other sites

Yes, it is possible, I've researched it because I had to work with it:

EnablePlayerControls(Bool abMovement, Bool abFighting, Bool abCamSwitch, Bool abLooking, Bool abSneaking, Bool abMenu, Bool abActivate, Bool abJournalTabs, Int aiDisablePOVType)

  • Enables the specified player controls.

DisablePlayerControls(Bool abMovement, Bool abFighting, Bool abCamSwitch, Bool abLooking, Bool abSneaking, Bool abMenu, Bool abActivate, Bool abJournalTabs, Int aiDisablePOVType)

  • Disables the specified player controls.

For the record, these are all the things you can enable or disable, you can't disable mounting - You can disable the player's ability to activate the horse, thus disabling his ability to activate it. You can add a script to the horses that checks if the player is a few units close(enough to activate it), then if he is, disable his ability to activate, if he isn't, then enable it with an OnUpdate event.

Edited by Kerberus14
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...