Problem with register[]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Gold_Car
Prole
Posts: 27
Joined: Thu Jan 01, 2015 2:07 am

Re: Problem with register[]

Post by Gold_Car » Tue Jan 13, 2015 8:25 am

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?
Attachments
Boxes and Zepps Missing.love
(29.12 KiB) Downloaded 20 times

davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Problem with register[]

Post by davisdude » Tue Jan 13, 2015 6:35 pm

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.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests