This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[WIP] RPG Starter [0.7 Beta]Create YOUR RPG!
Started by LuaEclipser, 26 March 2013 - 12:08 PMPosted 26 March 2013 - 01:08 PM
V0.7 Beta
ever wanted to make an rpg game, but not know how to start the game? well, this new Script By LuaEclipser does just that!
Change Log
v0.5 Beta - First Release
V0.6 Second Beta – actually works :3
v0.7 Third Beta – TESTED!!!!
Downloads
v0.5 Beta - pastebin get 8B6Ekz1d <anything>
v0.6 Beta - pastebin get uPky9ciL <anything>
My First RELEASED program. give me any tips!
Posted 26 March 2013 - 04:46 PM
Error before anything even happens:
rpgstarter:46: attempt to call nil
Posted 26 March 2013 - 09:06 PM
Error before anything even happens:rpgstarter:46: attempt to call nil
To fix that go to line 46 and change readComplete() to ReadComplete()
Posted 27 March 2013 - 03:10 PM
ThaNKS! I WILL FIX IT RIGHT AWAY!Error before anything even happens:rpgstarter:46: attempt to call nil
To fix that go to line 46 and change readComplete() to ReadComplete()
Posted 27 March 2013 - 03:14 PM
Fixed!
V0.6 Beta 2 Release!
V0.6 Beta 2 Release!
Posted 27 March 2013 - 03:24 PM
So wait, it is just a few lines of code with one health, and one gold variable? Even the header could be better. The w/2 is not the middle of the screen when you print the text.
The text offsets the center to the left 2. It would look better as
(w/2)-2 since it is a four letter word and half of that is two, that way it is truly centered. Or like I would do, create a function that gets the y point you want on the screen and the word and center it. such as,
function center(y,word)
local length = string.len(word)
local floored = math.floor(length)
term.setCursorPos((w/2)-floored,y)
term.write(word)
end
That way you can just call the function each time you want to center some text on the screen!
center(5,"Yay! I am centered now!") –sets the text on line 5 centered! Yay!
^ Like that
The text offsets the center to the left 2. It would look better as
(w/2)-2 since it is a four letter word and half of that is two, that way it is truly centered. Or like I would do, create a function that gets the y point you want on the screen and the word and center it. such as,
function center(y,word)
local length = string.len(word)
local floored = math.floor(length)
term.setCursorPos((w/2)-floored,y)
term.write(word)
end
That way you can just call the function each time you want to center some text on the screen!
center(5,"Yay! I am centered now!") –sets the text on line 5 centered! Yay!
^ Like that
Posted 27 March 2013 - 03:27 PM
Still not fixed.Got V0.6 Beta 2.
Posted 27 March 2013 - 04:51 PM
i do, wait, your right, i meant to do this
text = "bob"
term.setCursorPos(w/2 - #text/2, 1)
Posted 27 March 2013 - 04:54 PM
vo.7 TESTED!!!!!
i plan to make a GUI for easy creation
i plan to make a GUI for easy creation
Posted 28 March 2013 - 03:19 AM
This needs more info, and some screenies. No pics, no clicks.