Jump to content


ReBraLaCC's Content

There have been 76 items by ReBraLaCC (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#254793 [SOLVED] Problem with math.random()

Posted by ReBraLaCC on 25 June 2016 - 06:21 PM in Ask a Pro

So I'm trying to create and animate fire using random positions but I am getting some error
test.lua:5: bad argument #2: interval is empty
I've checked the code enough times and i dont get the problem...

function fire(x,y,height,spreadRad,frames,nLines,colors_back)
for a = 1,frames do
  for e = 1,nLines do
   g = math.random(x-1,x-spreadRad)
   j = math.random(y-1,y-height)
   paintutils.drawLine(x,y,g,j,colors.red)
  end
  sleep(0.003)
  term.setBackgroundColor(colors_back)
  term.clear()
end
end

fire(35,19,5,5,13,6,colors.black)

hope I'll get an answer that I'll understand because.... dafruq ;)



#254372 Run programm in background

Posted by ReBraLaCC on 21 June 2016 - 08:20 AM in Ask a Pro

View PostH4X0RZ, on 20 June 2016 - 07:25 PM, said:

coroutine

and how so those wor?



#254337 Run programm in background

Posted by ReBraLaCC on 20 June 2016 - 06:06 PM in Ask a Pro

View PostSewbacca, on 20 June 2016 - 04:47 PM, said:

local program = loadfile('myPrograms/program')
local shell = loadfile('rom/programs/shell')
parallel.waitForAll(shell, program)

^^ what i meant :)



#254324 Run programm in background

Posted by ReBraLaCC on 20 June 2016 - 04:10 PM in Ask a Pro

Well, you could always just make it a function as what you say gives no outputs, and maybe use [CODE]parallel.waitForAll()[\CODE]



#254312 CCEmuRedux - ComputerCraft Emulator Redux

Posted by ReBraLaCC on 20 June 2016 - 11:11 AM in General

View PostXtansia, on 20 June 2016 - 09:38 AM, said:

View PostReBraLaCC, on 19 June 2016 - 05:35 PM, said:

....
You don't need to download anything when there is an update, the launcher automatically updates when it detects a new version available.
It can just be slow to propagate due to caching.

Ahh okay, I'll see it popping up soon then :)/> Btw nice program, use it on every device i use.. PC and Laptop.... too bad it runs max 9fps on laptop, even tho its like 4-5 years old xD

Maybe a suggestion for it, add a place with an interface for modems and monitors... doing it manually is kinda hard sometimes



#254311 2.5D paint images

Posted by ReBraLaCC on 20 June 2016 - 09:47 AM in Ask a Pro

View PostBomb Bloke, on 20 June 2016 - 07:12 AM, said:

I use MS Paint for most of my sprite editing.

But converting the images to CC compatible files? I have a program for it, but it only it only works with monitors and work with bLittle API, I am going to use it... if you're okay with it... Should be possible then... only need to find out how the positions work exactly



#254300 2.5D paint images

Posted by ReBraLaCC on 20 June 2016 - 04:56 AM in Ask a Pro

View PostBomb Bloke, on 20 June 2016 - 12:57 AM, said:

Isometric graphics are easy; simply draw a diamond, squash it (typically down to half as tall as it is wide, though the ratio is up to you), then use that as your template for all the other lines you draw.
You'll have trouble making them look decent on a regular CC display, though. A decent-sized external monitor could pull it off (meaning your game would need to be entirely mouse-driven), but otherwise you just won't have sufficient display resolution. You'll also need to account for whether you're using "full sized" characters per "pixel" (in which case you'll want to squash your diamond to a third of its width), or whether you're using the teletext drawing characters (in which case half is probably best).
Also don't try to draw them in CC's Paint. Use some external application and then port the graphics into CC later.

Okay, well with what external program will i be able to do this exactly?

View PostLignum, on 19 June 2016 - 08:14 PM, said:

Whenever I need to do isometric rendering, I look at this post. Though I'm not sure how well isometric graphics would work in CC. I suggest you use the teletext characters for more detail.

I'll look into it when i get back from school



#254271 CCEmuRedux - ComputerCraft Emulator Redux

Posted by ReBraLaCC on 19 June 2016 - 05:35 PM in General

View PostXtansia, on 19 June 2016 - 08:30 AM, said:

v1.1-dev.20 :
  • Updated ComputerCraft font, as was still using font from 1.76pr6

Downloaded new one, still says v1.1-dev.19?



#254269 2.5D paint images

Posted by ReBraLaCC on 19 June 2016 - 05:15 PM in Ask a Pro

View PostH4X0RZ, on 19 June 2016 - 03:57 PM, said:

The one you linked is "just" an isometric game. You can easily turn real 3D engines like Unity into an isometric "engine" AFAIK.

Isometric is then the 'style' i'm looking for because... well i'll just link the game im creating iTunesPage

I will just made it 2D i guess and don't have a generated world or something, i'll need to figure this out ;3;

#LuaWhyBeSoHardSometimes



#254251 2.5D paint images

Posted by ReBraLaCC on 19 June 2016 - 03:52 PM in Ask a Pro

View PostH4X0RZ, on 19 June 2016 - 03:39 PM, said:

You could take a look at this https://youtu.be/y-chi097uV4?t=7m34s
Unless that's not the kind of 2.5D you meant.

Sadly have to say that it's 2D, because 2.5D is from an angle
Another image

Maybe now you know more :)
It doesnt matter if it's not possible with maybe a program, ill just look something else up



#254246 2.5D paint images

Posted by ReBraLaCC on 19 June 2016 - 03:24 PM in Ask a Pro

I am making a game in which i need 2.5D images, [example]
So what i wanted to know is how i could create them easy.
And what is the 'trick' behind making them, because for what i've tried.... it failed xD
- ReBraLa



#254038 Idea Exchange

Posted by ReBraLaCC on 17 June 2016 - 08:19 PM in General

Maybe an engine that supports 3D and work like Unity, add objects, change size etc.

I think it would give a lot more possibilities although CC is for making your own stuff, like engine, but having 1 simple-one premade would be amazing



#253821 SkyView | An HTTP based chat system [PROJECT IS DEAD]

Posted by ReBraLaCC on 15 June 2016 - 01:26 PM in Media

HTTP chat system? Probs has like 3k lines of code, but then again made easier with APIs and crazy code stuff ;D

This needs to be a thing :)

DAN ADD THIS <3



#253608 Center Text Program - (Help!)

Posted by ReBraLaCC on 12 June 2016 - 08:57 AM in Ask a Pro

View PostThe_Cat, on 12 June 2016 - 08:36 AM, said:

text = "Hello"
cursorX, __ = term.getCursorPos()
write(text)
cursorXAfter, _ = term.getCursorPos()
stringLength = cursorXAfter - cursorX
Would NOT recommend. :D/>

Don't you need to do -1 also then? I can't test it so ;)



#253607 Little Programs

Posted by ReBraLaCC on 12 June 2016 - 08:52 AM in Media

Would love to see the code for the fighting game! It is an interesting way of fighting with the sliding



#253569 Center Text Program - (Help!)

Posted by ReBraLaCC on 11 June 2016 - 09:09 PM in Ask a Pro

And if you need a text centering function look at this http://www.computerc...intu-paint-api/ Its an API that could be very usefull!



#253568 Couple of questions

Posted by ReBraLaCC on 11 June 2016 - 08:58 PM in Ask a Pro

View PostWergat, on 11 June 2016 - 05:38 PM, said:

foo = function() end -- Foo is a function
foo() -- Calls the function foo
bar(foo()) -- Passes the return value of foo() to the function bar as argument
bar(foo) -- Passes the function foo as an argument, it can be executed by function bar

But then you do like
function test()
 return
end

local function bar(function)
 parallel.waitForAll(function,test)
end

If im still wrong im dumb probs, or im not reading correctly ;)



#253554 Couple of questions

Posted by ReBraLaCC on 11 June 2016 - 05:26 PM in Ask a Pro

View PostKingofGamesYami, on 11 June 2016 - 04:50 PM, said:

However, you should close the file

This is not the code i am using, i just need to know how to be able to do it, because the way i did it, it didnt work :(



#253548 Couple of questions

Posted by ReBraLaCC on 11 June 2016 - 04:07 PM in Ask a Pro

Okay I don't know if it is possible, but because you're the pro, i am going to ask it

Is there any way to get a get this to work
function getData(table,saveTo)
to = fs.open(tostring(saveTo),"w")
to.write(table[1])
end

With that i mean that i can get a table from the input in the function

And does this also work with functions?

like:
function test(func,inp)
func(inp)
end

I would love to know if any of these work!

Reason im asking this: I will need this from my API PaintU



#253399 A.I Test

Posted by ReBraLaCC on 09 June 2016 - 03:37 PM in Games

I don't know what you mean with AI this way, because you're making the 'animated' X make a square at the left top, If it actually moved if you were standing in its path, then it was an AI, sorry not right now



#253378 VSF - higher definition images

Posted by ReBraLaCC on 09 June 2016 - 11:47 AM in Media

cool mate!



#253377 Center Text Program - (Help!)

Posted by ReBraLaCC on 09 June 2016 - 11:45 AM in Ask a Pro

I don't get it why you are getting textlength of a nil value, i would say use "textlength = #text" # returns the length of the input..

Never used monitors that much to be honest, need to get into them :)



#253196 [Ask A Pro] Please Help me Debug This Code

Posted by ReBraLaCC on 06 June 2016 - 09:02 PM in Ask a Pro

Server code:

You're opening rednet before you set the variable... first do rednetSide="right" then rednet.open(rednetSide)



#253195 Pine3D - Best performing 3d graphics library for CC!

Posted by ReBraLaCC on 06 June 2016 - 08:53 PM in APIs and Utilities

For some reason i cant access the video using the link, whats the name of the video?



#253193 REMOVED PAINTU

Posted by ReBraLaCC on 06 June 2016 - 08:49 PM in APIs and Utilities

View Posteniallator, on 06 June 2016 - 08:36 PM, said:

Suggestion I have for a extra cool thing for the 2 existing functions (or 2 new functions), you can have it take a string and have it automatically centre it in the box.

Wow, didn't even think of that! And thanks for checking the words, because I just wrote this quick :)/>

I'll get working on the idea tomorrow, because I kinda need sleep -3- :)/>

I have also changed it on pastebin now the thinkness xD