Change Spawn location

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.
Post Reply
99
Prole
Posts: 3
Joined: Tue Feb 08, 2022 9:41 pm

Change Spawn location

Post by 99 »

I'm making a simple RPG, How do I change where the player spawns at the beginning? I want to make the player spawn at X: -960, Y: -960

Thank you very much! :awesome:
User avatar
BrotSagtMist
Party member
Posts: 613
Joined: Fri Aug 06, 2021 10:30 pm

Re: Change Spawn location

Post by BrotSagtMist »

Thats the most generic non saying question i have read in a while.
How are we even supposed to know how your code works without seeing it?
obey
User avatar
togFox
Party member
Posts: 779
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Change Spawn location

Post by togFox »

player.x = -960
player.y = -960

?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Change Spawn location

Post by GVovkiv »

99 wrote: Sun Jun 05, 2022 11:40 pm I'm making a simple RPG, How do I change where the player spawns at the beginning? I want to make the player spawn at X: -960, Y: -960

Thank you very much! :awesome:
uh...
as there was pointed out, without your source we unable to help, you know
And, well...
Somethinh like that is not enough?

Code: Select all

local playerSpawnX, playerSpawnY = -960, -960
local playerX, playerY = 0, 0
local spawnPlayer = function()
	playerX, playerY = playerSpawnX, payerSpawnY
end
Post Reply

Who is online

Users browsing this forum: No registered users and 89 guests