|
| 27 Aug 2016 09:12 AM |
Hello, I dont know how to script and I'd like a basic script.
I'm creating a visual novel game (not love or oder things, a cool story) and I need a script where I can write as a narator and people can skip the writes to progress.
I dont know if its clear for you guys but its like in RPG when you talk to a NPC.
you just look at what he says and skip skip skip skip to listen to his story (its the same) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:14 AM |
local skip = false local text = "hello there boi" local t = "" for i=1,#text do print(string.sub(text,1,i)) if skip then break end wait() end print(text)
run this in command bar for example |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:15 AM |
if you want to make it wait on certain punctuation then do this for example
if string.sub(text,i,i) == "," then wait(0.2) end
inside the for loop |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:16 AM |
example #2:
local skip = false local text = "hello there boi, i am kinda bored also this works! derpy derp." local t = "" for i=1,#text do print(string.sub(text,1,i)) if skip then break end if string.sub(text,i,i) == "," then wait(0.2) end if string.sub(text,i,i) == "." then wait(1) end wait() end print(text) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:17 AM |
oops i mean
local skip = false local text = "hello there boi, i am kinda bored also this works! derpy derp." local t = "" for i=1,#text do print(string.sub(text,1,i)) if skip then break end if string.sub(text,i,i) == "," then wait(0.2) end if string.sub(text,i,i) == "." or string.sub(text,i,i) == "!" or string.sub(text,i,i) == "?" then wait(1) end wait() end print(text) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:20 AM |
| I didnt undestand but I'll try thanks man, if you need a small donation I can help you |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:21 AM |
string.sub()
will cut down a string until it starts at _ and ends at _
so my script will make it go through until it hits the max amount of characters it has
and will pause on things such as punctuation because it looks at the character it added |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:24 AM |
| i still dont undestand how to script LOL |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Aug 2016 09:26 AM |
| ######################################################################################################################################################################################################################################### |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:28 AM |
| ######################################################################################################################################################################################################################## |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:29 AM |
| ################################################# |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:29 AM |
| a5790b3faa5e98708f89af80a86515bb |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:30 AM |
| try this for uhhh ozayg (read backward) (it keeps censoring me ;(( ) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:31 AM |
just set the text every time it changes and make a function that will say that text |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 27 Aug 2016 09:32 AM |
| ################################################################################################################################################ |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 27 Aug 2016 09:32 AM |
pastebin
q4Aj64Ws
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:34 AM |
i dont think you undestand, "i dont know how to script" xD
can I just hire you to do it .-. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:34 AM |
i dont think he knows how to use matching which is why i used if statements it was so he can understand it better and also he wont know where to put that lol |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 27 Aug 2016 09:34 AM |
we're assuming that OP knows nothing about Lua since he even said that; he doesn't understand conditional statements either try again
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:35 AM |
and na learn to make it yourself kiddo it helps in the long run and then boom you know how to do it multiple times for free its not my fault you dont put effort into it |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:35 AM |
Exactly , you told me all these lovely scripts what do I do with them lol I got no iq |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 27 Aug 2016 09:35 AM |
I'll help you OP send me a FR
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
| |
|