Jump to content

I have check Wiki and Can't See to Get this to work


Videniofthesith

Recommended Posts

Its a simple pop up message, it pops up once and then does pop up again.

 

Scn aaaQueenWhisper1

 

short DoOnce

short Distance

ref Self

short HideMessage

 

Begin Gamemode

 

if DoOnce == 0

set Self to GetSelf

set Distance to 200

if Self.GetDistance Player <= Distance

MessageBox "Welcome, I have been waiting on you. Please don't let our little friends turn you away, they only want to play."

set hidemessage to 1

Endif

Endif

End

 

 

I got that, but it doesn't seem to work. I have one that works with the distance but setstage instead of the message box, so, I know I aint doing something right. Anyone show me what I did wrong?

Link to comment
Share on other sites

Honesty, I have no idea. I looked around in CS on the dark brother hoods pirate quest, where you came up to the box. I just now removed the "getself" line and the message box pops up now, but when I close it, it just pops right back up. I think I read something about that, something about a messagebox spam or something. I am not sure, I will be looking on the Wiki tomorrow to see if I can fix it, but any help now would be great too!

I Thought the hide message box was suppose to stop it from doing that, and the doonce was a part of that, I guess I was wrong though.

Thanks!

 

 

http://www.tesnexus.com/downloads/file.php?id=36773

The mod it is going into.

Edited by Videniofthesith
Link to comment
Share on other sites

If you're going to mod, you need to understand what different variables and functions do. Copy & pasting only works if you understand the basics, so it's going to be really, really important to learn about variables and how to use them. Otherwise, you're going to spend a lot of time waiting for people to explain things and/or searching for answers-- at least, that's what I ended up doing.

 

In this script, the variable doonce works like this

 

This line declares the variable. By default, it's set to zero.

short DoOnce

 

This block of script says, if doonce equals zero, then do everything between "if DoOnce == 0" and "Endif".

if DoOnce == 0

set Self to GetSelf

set Distance to 200

if Self.GetDistance Player <= Distance

MessageBox "Welcome, I have been waiting on you. Please don't let our little friends turn you away, they only want to play."

set hidemessage to 1

Endif

Endif

End

 

The problem is, since DoOnce is never set to anything except zero, it will always equal zero. You need to set it to 1.

 

I don't know what "hidemessage" is supposed to do. From what you're posting, it starts out as zero, is set to 1, and isn't referred to again.

 

This tutorial at the wiki really will help you understand things better-- it certainly will do a better job of explaining it than I can! :) -> House For Sale Tutorial.

 

I would also strongly recommend going to TESAlliance and working through the scripting classes. Again, it will make modding much easier and much less frustrating.

Link to comment
Share on other sites

well with all the scripts I have written out for this mod, I never added a doonce in there. Didn't have a need for it, whatever it did, so I didn't add it. Also the hidemessage should have been self explain, it was if hidemessage == 0 I figured it was saying "message box not displayed" then show it, then set hidemessage == 1 (saying to show the message) but after thinking about it I need a line that tells it to reset it to 0, to hide the message and then change the doonce to 1, so the message doesn't show up again..... I will try that.
Link to comment
Share on other sites

So, the script came out like this.

 

Scn aaaQueenWhisper1

 

short DoOnce

short Distance

ref Self

short HideMessage

short reset

 

Begin Gamemode

 

if DoOnce == 0

set Distance to 200

if Self.GetDistance Player <= Distance

MessageBox "Welcome, I have been waiting on you. Please don't let our little friends turn you away, they only want to play."

set hidemessage to 1

set DoOnce to 1

set reset to 0

Endif

Endif

End

Link to comment
Share on other sites

It would really help if you posted your scripts in

[code boxes, as you have already been advised. Now then, try this:

Scn aaaQueenWhisper1

ref Self
short DoOnce
short Distance

Begin Gamemode

if DoOnce = 1
Return
else
set Distance to 200
set Self to GetSelf
if Self.GetDistance Player <= Distance
	MessageBox "Welcome, I have been waiting on you. Please don't let our little friends turn you away, they only want to play."
	set DoOnce to 1
Endif
Endif

End 

 

 

What this does is:

If DoOnce has been set to 1 do not continue (Return)

If DoOnce is still 0, then display the message and set DoOnce to 1 (so it won't run again)

Link to comment
Share on other sites

I got it to work on my own, with what I said before. Thanks for the help and I Don't think anyone said that to me, because I still don't know how to post them in code boxes. Telling me how would have ensured I did it. :)
Link to comment
Share on other sites

I feel sure that I have explained this before, but let's put that aside. When you post any long list it should be placed inside spoiler tags. When you post any kind of script you should also include code tags. To do this enter your text inside the following, but remove the quote marks (they are there so that this code does not work, and you can see it's workings).

 

["spoiler"]["code"]

.....enter your list or script here

["/code"]["/spoiler"]

 

The order you place the opening and closing spoiler/code tags is important.

Link to comment
Share on other sites

Alright, so I got the first message box popup to work, but I can't get the rest to pop up after that. I used the very same code and I was wondering if I should change the doonce to 2 instead of 1 on the second one or something like that, here is what I got.

 

 

Scn aaaQueenWhisper1

short DoOnce
short Distance
ref Self 
short HideMessage
short reset

Begin Gamemode

if DoOnce == 0 
set Distance to 50
if Self.GetDistance Player <= Distance 
	MessageBox "Welcome, I have been waiting on you. Please don't let our little friends turn you away, they only want to play."
		set hidemessage to 1
		set DoOnce to 1
		set reset to 0
		Endif
Endif
End
[code][spoiler]

and for the second one

[spoiler][code]
Scn aaaQueenWhisper3

short DoOnce
short Distance
ref Self 
short HideMessage
short reset

Begin OnAdd

	if DoOnce == 0 
set Distance to 50
if Self.GetDistance Player <= Distance

		MessageBox "Having fun yet? I am. Your fun."
		set hidemessage to 1
		set DoOnce to 1
		set reset to 0
		Endif
Endif
End

 

Edited by Videniofthesith
Link to comment
Share on other sites

  • Recently Browsing   0 members

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