Jump to content

Trouble with custom spawn points...


Kerilynne

Recommended Posts

Bassair and I are working on some custom professions for our gameplay, and when we try to put in related spawn points...

 

...the game totally ignores it.

 

We're not translating our coordinates wrong (that I know of O_O;;;; ) so I was wondering if something was hinky with our code...

local function initBKSpawn()	local spawn;		spawn = {		{			--Middle of Nowhere			worldX = 37,			worldY = -98,			posX = 134,			posY = 208,		},		{			---Middle of Nowhere			worldX = 37,			worldY = 35,			posX = -66,			posY = -112,		},

(More coordinates...)

}BaseGameCharacterDetails.spawnPoint.MuldraughKY.streetkid = spawnPoint;endEvents.OnGameBoot.Add(DoProfessions);Events.OnGameStart.Add(initBKSpawn)

I'm probably doing something silly like adding wrong or missing a symbol...  :shock:

Link to comment
Share on other sites

Ah now it makes sense. You have a mistake in your code.

BaseGameCharacterDetails.spawnPoint.MuldraughKY.streetkid = spawnPoint;

needs to be 

BaseGameCharacterDetails.spawnPoint.MuldraughKY.streetkid = spawn;

as you want to save the table with the spawn points ;)


Btw. I have information how to do custom professions in my tutorial. You should give it a look if you haven't done so already:

 

http://theindiestone.com/forums/index.php/topic/61-robomats-modding-tutorials-updated-12112013/#IV

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...