Camera

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
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Sun Jun 04, 2017 7:47 am So im beginning to rewrite my code but i still get the same error i dont know whats wrong with my code game.love
Ill check the .love file later. See the error screen. It tells you what is wrong. It says on what line of code on what file etc etc. Try your best to debug whats happening
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

Oh ok
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Sun Jun 04, 2017 7:47 am So im beginning to rewrite my code but i still get the same error i dont know whats wrong with my code game.love
Okay, it's because you are using the variable "mouseX" and "mouseY", which, in your code dont exist. I only used those two variables as an example. Please dont just copy paste code. Try to understand it.
Oh, ive told you before that use ".", not ":" in your main.lua

WHY?

Because the functions in your gamestates/main_menu.lua is, example,

Code: Select all

function MAIN_MENU.load() end --YOU USE . HERE
--etc etc
So basically, use that in your main.lua since you are calling that function. If you use ":", that adds "self" as the first argument to that function, hence, ofsetting the arguments/parameters, hence make your code in glitch. I hope you understand
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

Ok i fixed my code thanks
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

game.love
(579.07 KiB) Downloaded 176 times
i rewrote my code but the camera doesnt do anything the code i used was the example on the docs. The camera is on the player.lua file on the entities
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

i really dont know whats wrong with it
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

Perhaps dont put camera in your player. Put it in the gamestate (your main game state). Is there an error?
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

There is no error it just doesnt work
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

Ive put it in that gamestate and yet it still doesnt do anything
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Tue Jun 06, 2017 1:47 pm Ive put it in that gamestate and yet it still doesnt do anything
That hump camera doesn't work for you, find another module and learn to implement it yourself. Learning is fun :)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 37 guests