Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Scripting Dialogue with the Player Talking


JulianSull
 Share

Recommended Posts

I'm trying to design a special type of script where the player speaks by means of using message boxes and here is what i have come up with so far:


scn aaaFirstEntry


short DoOnce

float timer

short talking

float fQuestDelayTime

short button

short choosing


begin GameMode


set fQuestDelayTime to .2


if (aaaFirstTimeAtPortal == 1)

	if (DoOnce == 0)

		PlaySound aaaExplosionStart

		set DoOnce to 1

		DisablePlayerControls

	endif


	if (GetStage aaaEscapingTheCastle < 10 && talking < 24)

		Set timer to ( timer - GetSecondsPassed)

	endif 


	if (Timer <= 0 && talking < 24)

    		if (talking == 0 )

			aaaMagnusRef.Enable

			aaaRyenaRef.Enable

			Set Timer to aaaMagnusRef.Say aaaFirstEntryConversation 1 aaaMagnus 1

			Set talking to 1

			StartQuest aaaEscapingTheCastle

			set aaaFirstEntryDownStairs to 1

			EnablePlayerControls

			aaaMagnusRef.EVP

			aaaRyenaRef.EVP

		elseif (talking == 1)

			if (choosing == 0)

				MessageBox "You: Where am I?"

				set talking to 2

				set choosing to 1

			endif

		elseif (talking == 2  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 3

		elseif (talking == 3)

			if (choosing == 0)

				MessageBox "You: By who?"

				Set talking to 4

				set choosing to 1

			endif

		elseif (talking == 4  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaMagnusRef.Say aaaFirstEntryConversation 1 aaaMagnus 1

			Set talking to 5

		elseif (talking == 5)

			if (choosing == 0)

				MessageBox "You: What does he want with us?"

				Set talking to 6

				set choosing to 1

			endif

		elseif (talking == 6  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 7

		elseif (talking == 7)

			if (choosing == 0)

				MessageBox "You: Why hasn't he come after you here?"

				Set talking to 8

				set choosing to 1

			endif

		elseif (talking == 8  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaMagnusRef.Say aaaFirstEntryConversation 1 aaaMagnus 1

			Set talking to 9

		elseif (talking == 9)

			if (choosing == 0)

				MessageBox "You: We should go after him then! We can't just stay here!"

				Set talking to 10

				set choosing to 1

			endif

		elseif (talking == 10  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 11

		elseif (talking == 11)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 12

		elseif (talking == 12)

			if (choosing == 0)

				MessageBox "You: I'll find a way out of here. We have to. "

				Set talking to 13

				set choosing to 1

			endif

		elseif (talking == 13  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaMagnusRef.Say aaaFirstEntryConversation 1 aaaMagnus 1

			Set talking to 14

		elseif (talking == 14)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 15			

		elseif (talking == 15)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 16	

		elseif (talking == 16)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 17

		elseif (talking == 18)

			Set Timer to aaaMagnusRef.Say aaaFirstEntryConversation 1 aaaMagnus 1

			Set talking to 19

		elseif (talking == 19)

			if (choosing == 0)

				MessageBox "You: Can you two handle yourself if he does come after you?"

				Set talking to 20

				set choosing to 1

			endif

		elseif (talking == 20  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 21	

		elseif (talking == 21)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 22

		elseif (talking == 22)

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 23

		elseif (talking == 23)

			if (choosing == 0)

				MessageBox "You: How did you make that?"	

				Set talking to 24

				set choosing to 1

			endif

		elseif (talking == 24  && GetButtonPressed  == 0 )

			Set choosing to 0

			Set Timer to aaaRyenaRef.Say aaaRyenaTopicsFirstEntry 1 aaaRyena 1

			Set talking to 24

     	endif

	endif


endif


end

Basically what i get from that is completely random subtitles, no voices and completely random message boxes. Anyone see why this is happening?

Link to comment
Share on other sites

Some notes.

1. Make sure 'timer' is actually getting a positive value in it where you set it to a speech length.

2. Make sure the current stage of aaaEscapingTheCastle is less than 10 .

3. You set talking to 17 but you never check for 17. The script should end right there.

4. You never actually 'say' anything, you are setting the timer to the length of the say command. (or not, I never worked with that command.)

5. In the 'ElseIf' for talking == 24, you set it to 24 again. So it will never leave that condition.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...