problem with event with branching choices

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
So I want to my game to start off with the three main characters being in different places and then being separately called in to the adventure.

So I started with Princess Nadie, who has a conversation which will ultimately boil down to her being killed or her being brought to the site of the adventure (which we won't see just yet at that point because we will first pick up the second main character).

I put in a label so that I don't have to keep typing and making new lines and such. The label is called 'the next contestant'.

But after the scene has changed from Princess Nadie in her bedroom to Norlamin in the Port Town I suddenly see the soldier (who Princess Nadie had the conversation with) say "I'm sorry Milady but I have to follow orders" and then I get a game over because he kills her (as per protocol). I can't figure out which of the branches he is using for that and why.

I would put the event page here or something, except that I don't know how to do that (as the event page goes on pretty long I can't really make a print screen)
 

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
Ok. I managed to make printscreens of it.

part 1



part 2



part 3



part 4



Photobucket is doing weird, but I at least think that this is the correct order of things.
 

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
Someone on the Steam Forums managed to solve it for me :) .

In case someone else comes across this problem:

- remove the label 'the next contestant' from where it is inside the conditional branches

- add in a jump to 'the next contestant' in it's place

- make a label 'the next contestant' outside of the conditional branches.

Yea, I think that's everything.
 

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
Rather than using labels (they're just ... bad, mkay?) look at a tutorial on using switches and self-switches.

You can probably break that event into several event pages. They'll be more clear and less prone to bugs. It may seem a small thing, but if you start with good programming habits (and eventing is a form of coding) you'll be much better off in the long run.
 

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
Could you help me go through that event and show me how I could break this down into several event pages?

I'd like to do this but I have just absolutely no idea how I would do this with the conditions and such.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
If you don't know how to use multiple pages and switches, then you should go doing some of the basic tutorials. Because that is the very foundation of anything more complex than a go-there-text. You can follow the link in my signature to the more important tutorials.


That said, the first step in your case would be to split the action in a way that everything that happens with one of the starting actors is on one page per actor, and then condition each of those three pages to "Actor # exists" (exists means "is in party").


Then remove the actor from the party once the destination is reached, add the next one to the party and transfer to the next starting point.


And no matter which actor currently is in the party, only the page for that actor would be executed.
 

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
I get that with a cutscene type of event you don't want to keep on happening after they've first happened you have to make with a second page with condition A is on and nothing in it for the rest and then at the end of page 1 you put condition A on.

But what I don't know is how I could/would split the event scene that I posted above in 4 parts so that I could do those.

Are events confined to maps?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I get that with a cutscene type of event you don't want to keep on happening after they've first happened you have to make with a second page with condition A is on and nothing in it for the rest and then at the end of page 1 you put condition A on.
Wrong - you cannot "put condition on", you only "command cotrol switch ON".
That is a very important difference, because the condition is on the left part, while the control switch command is on the right/content part. Mixing that up ends in a lot of errors.

But what I don't know is how I could/would split the event scene that I posted above in 4 parts so that I could do those.
I read that event in more detail, and it looks like that is what happens with one actor (which means that it's one page), and you just need to use switches to make sure that the event doesn't happen again when you reenter the map at a later time.
To do that, you need another page for the event, including what should heppen when you go to that map at a later time, condition that second page at self-switch A and put a control self-switch A at the end of he "next contestant" sequence.


Alternatively, you can place that "next contestant"-sequence in a new page, condition that page to another self-switch, and wherever you had placed a "jump to label next contestant", you'll place a control self-switch instead.

Are events confined to maps?
Map-events are map-based and cannot leave the map.
Common events always run, independently of the current map


Troop event only run in the battle with that specific troop


(common events and troop events are defined in the database, map events on the map editor)
 

MistressDarna

Veteran
Veteran
Joined
Jun 1, 2014
Messages
52
Reaction score
0
First Language
Dutch
Primarily Uses
Nadie isn't going to come back to this map.

I'm making this for the competition and after the 3 'contestant is asked to 'volunteer' events the party is in the dungeon and they have get out of it, after which there is a grand final in the throne room and the party has to kill the king.

So all the maps are basically one time use only.

But, for argument's sake as I do understand what you are trying to get at: you would want me to put this cycle of events in the common events with conditions based on the map?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
MistressDarna, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
Labels are life
Labels should be avoided except in rare cases. Labels and goto labels are basically what we call in programming a 'GOTO', and those are frowned upon because they make it harder for others to understand what you are doing with your Programs or in this case Events. Lets say you were on a team or sharing the project file with others, if they say a lot of labels and gotos they would get confused easily.


Only use labels for comments if anything.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Nonsense! (to EVERYONE who says "don't use them because they're bad, not specifically to the post immediately above)


Labels have a purpose. If you know what it is and you use them properly, they are very useful. If you don't know what they're for and use them incorrectly, you can make a terrible mess - just like any other event command.


That is like saying parallel processes are bad and shouldn't be used. I will be the first to tell you to avoid them wherever possible. But they also have a purpose, and when used correctly, are just fine.
 
Last edited by a moderator:

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
It's okay in some cases, but you do you want to sit there and look though some 200 line event looking for the label that they are Jumping to? When in most Cases it can be handled by a loop and a break, a conditional branch, or new event page. It's not always bad there are a few rare cases it's preferred but no many. But maybe that's just something I've been conditioned to think is "bad" as a programmer in creating with structured design.


But back on topic it seems it was solved in the 3rd post. If it's working and he likes it that should be that.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I saw the OP ask more questions that I don't think have been answered yet.
 
Last edited by a moderator:

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
Ok so you just want the event to play once and then its over is that what I'm understanding?


For that turn on a switch or self switch and make a new event page that is conditioned for that switch. Then leave said switch on for the rest of the game and "Exit Event Processing".


Or if the event is already conditioned to a switch then turn off the switch and "Exit Event Processing"


both will serve so make sure the event only happens the 1 time.
 

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
Nonsense! (to EVERYONE who says "don't use them because they're bad, not specifically to the post immediately above)

Labels have a purpose. If you know what it is and you use them properly, they are very useful. If you don't know what they're for and use them incorrectly, you can make a terrible mess - just like any other event command.

That is like saying parallel processes are bad and shouldn't be used. I will be the first to tell you to avoid them wherever possible. But they also have a purpose, and when used correctly, are just fine.
Yes, there are exactly two conditions where using a goto is acceptable (see: Structured Programming with go to statements - Knuth): breaking out of DEEPLY nested loops (at least three deep), and error handling.  Error handling is usually done with try/catch blocks, or some similar construction in modern languages, while you have the label for getting out of the deep loops.

Anything else can be better handled with other control structures.

Seeing labels (especially more than one) in code tells me that the code should be redone/refactored whatever it's called this week using switches, variables, conditionals, or different loop structures. That's the sort of surface level stuff that needs to be cleaned up before you even start to look deeper into the code.

At the very least, the code after the label could be set to a different page with the 'goto' replaced by a self-switch set.

I can't think of any design/style document I've ever seen that would allow label use as the OP is doing.

Am I dogmatic about that? Yeah, I am, though not as strict as some: many prohibit their use entirely, no matter how deep the loops get, and 'catch' pretty much covers error handling.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I use them for things other than that, and it makes the code a WHOLE lot easier to understand, and more efficient.
 

RyokuHasu

Developer
Veteran
Joined
Jun 23, 2012
Messages
274
Reaction score
37
First Language
English
Primarily Uses
you and us have different views of "Easy to understand" then, maybe you do use them in efficient ways, but most people don't. lets just keep our views of efficiency and structure to ourselves for now. =D

*hugs the mod*
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
lol! Maybe for fun, I will find one of these events, and show you how it looks using labels and jumps, and how it looks without, and see which one you think is easier to follow ;)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top