Jump to content

How do I move forward in a quest by having the player read a book in C


Recommended Posts

you attach a script to that book/door.

 

 

scn testscript

 

short doonce

 

if doonce == 0

set doonce to 1

setstage <questid> <stage>

endif

 

end

 

or something like that,

Well, I guess that's really close. I just need a block type in the begin command now. lol

Actually, nevermind I got it. Begin OnActivate.

Woo. lol

Link to comment
Share on other sites

you attach a script to that book/door.

 

 

scn testscript

 

short doonce

 

if doonce == 0

set doonce to 1

setstage <questid> <stage>

endif

 

end

 

or something like that,

Well, I guess that's really close. I just need a block type in the begin command now. lol

Actually, nevermind I got it. Begin OnActivate.

Woo. lol

Okay, so the problem remains... Now when I start the quest, both of the stages are activated for some reason... Any help anyone?

Link to comment
Share on other sites

 

Okay, so the problem remains... Now when I start the quest, both of the stages are activated for some reason... Any help anyone?

 

I think your doonce variable needs to be defined in the quest script rather than in the book/door script so that both items refer to the same variable instead of identically named "local" variables that are private to the individual items. Then your book/door script can refer to/change the quest variable.

Link to comment
Share on other sites

 

Okay, so the problem remains... Now when I start the quest, both of the stages are activated for some reason... Any help anyone?

 

I think your doonce variable needs to be defined in the quest script rather than in the book/door script so that both items refer to the same variable instead of identically named "local" variables that are private to the individual items. Then your book/door script can refer to/change the quest variable.

So how exactly would I do that? I'm really new to the scripting thing. But I guess you could tell haha

Link to comment
Share on other sites

Okay, so the problem remains... Now when I start the quest, both of the stages are activated for some reason... Any help anyone?

 

I think your doonce variable needs to be defined in the quest script rather than in the book/door script so that both items refer to the same variable instead of identically named "local" variables that are private to the individual items. Then your book/door script can refer to/change the quest variable.

So how exactly would I do that? I'm really new to the scripting thing. But I guess you could tell haha

 

You add another script and this one attaches to the quest itself on the quest page

 

 

srn myquestscript

short mydoonce

 

Then from the other book/door script you would refer to it

scn testscript

on activate

if myquest.mydoonce == 0 
set myquest.mydoonce to 1
setstage myquest <stage>
endif

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

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