Page 2 of 2

Re: Problem with register[]

Posted: Tue Jan 13, 2015 8:25 am
by Gold_Car
Thanks for the edit.

I've replaced a few of the items in my code and things are running a lot better now. Unfortunately, my game is still not doing what I need it to: summon an entity.

I decided to just move on from the falling box and follow the instructions from Goature's next video, where he covers adding the first significant entity: A zeppelin. Unfortunately, that didn't work out so well. I had a lot of problems with the code I typed and just one For Loop. I went through the code looking for errors and solved a bunch of issues that made it crash, and now the game does not blue-screen anymore.

But the game still does not draw entities. I put a bunch of messages for the console in my code that print whenever something supposedly loads, but those are the only hint of any moving object (that isn't a cloud) existing within my code.

The tutorial was about adding Zeppelins, but instead I decided to add something called Zepp that just floats in the sky looking ridiculous. Don't worry, it'll make sense if you see the attachment.

I put a Zepp in the sky, but he's just a graphic at this point and not an entity. Do you know how I can get the game to visually create the moving zepps?

Re: Problem with register[]

Posted: Tue Jan 13, 2015 6:35 pm
by davisdude
From what I understand of the entity system he's made, you're doing it wrong.
You need to CREATE them using the ents.Create function in your main.lua file after doing the ents.Startup function. So you need to do something like this:

Code: Select all

ents.Create( 'zepp' ) -- Or whatever it's called. The name you register in the ents.Startup function.