Possibly obvious: Replay scene using player choice

Hi. Not sure how I'd look in the existing topics for this, if already posted, FYI. Wording choice, maybe.

So I have a mechanic in my game regarding erotic scenes to be "replayed" by the character at later times if they want to. For.. reasons.

One I've been pondering, but I'm not awesome with scripting, has to do with a scene with 4 rooms (as an example). All 4 have to be visited before the player can continue, which I have worked out to allow progression with flags (and make invisible or object changes, etc of course).

What I want to be able to do, is have this be "relived" (or whatever gimmick is used) in the order the player experienced it. So it's not always A B C D, could be B D C A, or A D C B etc. Basically order of events.

Is there a good way to do that, like using custom flags or something else? I assume it's more If/Else If/Else scripting with 1 flag per room/event, scripted in 16 different ways (yay), but I wanted to ask if there was a simpler method to achieve this.

Mostly in case I write something with 6 rooms/events, I don't have to make 36 variations just to revisit something as-experienced, for a fun gimmick.

If there is a less complex method, I'd love to know. I'm a very visual person, so I like using Quest's UI to build the game, if this helps for suggestions on how I'd approach this. And if not, please let me know?


4 variables...
game.Room1
game.Room2
game.Room3
game.Room4

game.Room1= first room visited
game.Room2=second room visited
And so on...
(At least that's how I would do it...)


I'd say create an objectlist attribute to hold the rooms visited.

When you visit a room, add it to the list.

Then you can use if (ListContains (game.roomsvisited, some room)) { to tell if the player has visited a certain room yet, so you don't need to use separate flags.

And then to replay the sequence, you'd do:

foreach (room, game.roomsvisited) {
  // display the content for 'room'
}

Hopefully that's comprehensible.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums