Skip to main content
Tweeted twitter.com/StackGameDev/status/671280782250524672
Capitalization and grammar edits, title
Source Link
congusbongus
  • 14.9k
  • 59
  • 91

Saving user progression How do I save which NPCs the player has talked to?

I have buildbuilt a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for a lot of NPCs eventually, so it would be nice if I didn't do stuff like:

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?

Saving user progression?

I have build a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for a lot of NPCs eventually, so it would be nice if I didn't do stuff like:

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?

How do I save which NPCs the player has talked to?

I have built a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for a lot of NPCs eventually, so it would be nice if I didn't do stuff like:

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

I have build a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for alota lot of NPC'sNPCs eventually, so Itit would be nice Ifif I didn't do stuff like:

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?

I have build a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for alot of NPC's eventually, so It would be nice If I didn't do stuff like

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?

I have build a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for a lot of NPCs eventually, so it would be nice if I didn't do stuff like:

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?

Source Link

Saving user progression?

I have build a save system that saves the players name, x and y location, map and the direction they are looking at in JSON.

{
data: [
    {
        x: 400
        y: 424
        d: UP
        name: Ezia
        mapname: startmap
    }
]
}

Now I have dialogue in my game, but I want to progress in that as well. So for example you have "Guy 1" who I just talked to, he says some stuff, afterwards he says something else, different text. How can I save it so the game knows I have already talked to "Guy 1"? I need to do this for alot of NPC's eventually, so It would be nice If I didn't do stuff like

Guy1TalkedTo = 1
Guy2TalkedTo = 0
Guy3TalkedTo = 1

Etc.

Anybody have a good idea?