Jump to content

Starting a quest on Chem usage


Recommended Posts

So name is somewhat self explanatory, I've created a chem that when used turns the player into a superhuman. there's an accompanying quest that is also meant to activate when the player is "superhuman", My transform script works completely as I intended, so does my quest; though the only way to start the quest currently is through console commands. I tried adding some relevant lines to my transformation script but it doesn't seem to make very much difference. Here is my script:

Scriptname SHSS_FEVTransformationScript extends activemagiceffect

Race Property SHSS_SuperhumanRace auto
Quest Property SHSS_FEVQuestTimer01 auto

Event OnEffectStart (Actor akTarget, Actor akCaster)
Game.GetPlayer().SetRace(SHSS_SuperhumanRace)
SHSS_FEVQuestTimer01.SetStage(1)
EndEvent


Also I'd like to point out that I've tried a couple of variations such as

"Game.GetQuest(SHSS_FEVTQuestTimer01).SetStage(1)", "Game.SetStage(SHSS_FEVQuestTimer01, 1)", "Game.GetQuest().SetStage(SHSS_FEVQuestTimer01, 1)", "Game.GetPlayer().SetStage(SHSS_FEVQuestTimer01, 1)"

Evidently these didn't work either :/

As you can probably see I'm not a pro at papyrus by any stretch of the imagination, I found the call to quest line "[Quest Name].Setstage(1)" from looking through papyrus reference on the ck website but I'm clearly not using it right or things would be working by now.
How can I alter this script to make it run. Or would I be better off attaching another script directly to the object so that my transform script is still on the MGEF, but there is a second script on the "Potion" that runs quest on object init. Maybe there's another much simpler method that I'm missing?

 


<nb> Adding a duration to my MGEF is not ideal as that appears to use real-time and I want my effect to wear down during game-time progression.

Link to comment
Share on other sites

Have you linked the properties using the [Properties] button ?

 

Does your quest actually have a Stage(1) ?

Are any of the quest stages marked [Run on Start] ? If yes you can call QuestName.Start() after linking the QuestName property ...

 

EDIT: are you running this script and quest in a dirty savegame that has seen a previous version of the script or quest ?

Link to comment
Share on other sites

Hi,

I have made sure to link the properties

 

My quest does have a stage 1 (which is simply an in-game timer set to progress to stage 2 on reaching end of time limit. Stage 2 of said quest reverts player back to human race)

 

I'm away from ck at the moment but will double check run on start when I get back, though if I recall correctly it does have run on start.

 

Did not think about the save game issue. will definitely keep an eye on that too.

 

I was wondering it might if it might not be more straightforward to implement the "unusedstamina" AV (probably a throwback to skyrim), add it to my race along with an effect that causes DoT to the AV, and then simply adding a function to all of the "superhuman abilities" that requires the user to have "unusedstamina" >= 1?

I've never dealt with av's before maybe trying to use this method would cause a mess I'm unable to fix, then there's the fact that I'd need to add a status bar to the HUD so users can track their "unusedstamina", The bonus though would be that there'd be no issues with quest scripting, and that having my timer tracked as an AV might make the mod feel more immersive. comments?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...