Jump to content

Help me with this script


Guest KillMeTwice

Recommended Posts

Guest KillMeTwice

Havnt scripted before and i just downloaded the talking sword script and enchantment but i dont know where to add the speech :P

 

 

elseif IsCloudy && Owner.IsInInterior == 0 && SwdR2 != 4 && SwdR3 != 4 && Constant > 75

;runs if the weather is cloudy

if SwdTimer > SwdFrequency2

set SwdR to 4

StartQuest zzSwordDialog

set SwdLoopStatus to 1

return

endif

Link to comment
Share on other sites

Havnt scripted before and i just downloaded the talking sword script and enchantment but i dont know where to add the speech :P

 

 

elseif IsCloudy && Owner.IsInInterior == 0 && SwdR2 != 4 && SwdR3 != 4 && Constant > 75

;runs if the weather is cloudy

if SwdTimer > SwdFrequency2

set SwdR to 4

StartQuest zzSwordDialog

set SwdLoopStatus to 1

return

endif

 

Don't know the total script, nor the mod you're referring to, but based upon the scripting logic I guess it can be placed here;

 

elseif IsCloudy && Owner.IsInInterior == 0 && SwdR2 != 4 && SwdR3 != 4 && Constant > 75
;runs if the weather is cloudy
	  if SwdTimer > SwdFrequency2
			Message "Type here the speech you want to become visible on your screen"
set SwdR to 4
StartQuest zzSwordDialog
set SwdLoopStatus to 1
return
	  endif

 

In scripting it comes to this: wathever comes next to a line starting with an 'if', 'elseif', or 'else' is the command that will happen.

 

Above script-part can be read like this;

elseif IsCloudy && Owner.IsInInterior == 0 && SwdR2 != 4 && SwdR3 != 4 && Constant > 75

==> If it is cloudy, you are not inside a building (and the meaning of Swdr depends on the mod's contents...)

;runs if the weather is cloudy

==> This is nothing more than an explanation of the scripter to the people who read this script. By adding the ; sign, he tells the computer to ignore this line.

if SwdTimer > SwdFrequency2

==> And when above is fullfilled + a time (started somewhere in the begin of the script) is higher than

Message "Type here the speech you want to become visible on your screen"

==> Then the message (whatever you want to see as text on your screen) will appear

set SwdR to 4

==> Also Swdr wil be set to 4

StartQuest zzSwordDialog

==> Also the quest named 'zzSwordWialog' will be started (see BTW beneath!)

set SwdLoopStatus to 1

==> Also SwdLoopStatus wil be set to 1

return

==> This will end the reading of the script by the computer, telling him there's nothing more. (As far as I know, that's not needed here...)

endif

==> this 'endif' function is needed to let the computer know there's nothing more to be done when it is cloudy, etc... (Since this scriptblock has started with 'if' , 'endif' always needs to be put here.

 

 

BTW the sentence in the script 'StartQuest zzSwordDialog' is a sentence that tells the game that it should start a quest, and based upon the title of that quest (zzSwordDialog) it seems that it's that quest that adds the different dialogs/speeches, not this script... So if you want to change the speech it must be done in that quest, or you could erase this sentence and use that 'message' line I put in there. But when doing so be aware that this simple modification can change a lot! You must know what that quest does beforehand!

 

greetz

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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