M
Matthew Ottewell
Guest
Hi everyone! Here are my two problems, and help on either would be great.
1. The immediate problem. I would like to impact my game with certain dialogue choices. If you choose a rude dialogue path, your relationship with an NPC breaks down, and possible dialogue options filled with a whole host of good stuff disappears.
2. The more long term problem. My object creating the entire dialogue array is loading all the modifiers upon creation. This is obviously not ideal. Using an if statement with a certain statement starts a continuous loop of increased Charisma scores. I would like advice on any resource that is good at explaining GameMaker structure (create events, step events) or a well written book/resource for a programming language that is very similar to Gamemaker (and I have no clue what that language would be) For example:
global.InnkeeperYdrin[8,2]="Thank you for your help!";
global.InnkeeperYdrin[8,3]="Thank you Ydrin. I will help protect the town."; global.Charisma +=1;
global.InnkeeperYdrin[8,4]="I'll do what I can. Goodbye.";
This simply takes whatever you roll for Charisma at the start of the game and adds 1 to it before you access the array. I think I understand: this is in the create event with a global variable. Upon creation it sees this and does what you tell it to. I need to create something separate. So I tried this.
global.InnkeeperYdrinConversationGroup = 1;
This is in the same object. It keeps track of what block of conversations you are on. This prevents the immediate application of the modifier.
But if I put all of this into a separate object with the following if statement
if (global.InnkeeperYdrinConversationGroup = 8)
{ global.Charisma +=1;}
It continuously accesses the state of being on that conversation group until I switch off of it, adding I am assuming 60 charisma per second, based on the room speed.
I have tried things like the following below, but it just accesses the creation event and adds the Charisma, again, off the top. I copied the snippet below, Flag was initialized as true in the create event. This is step code.
if (global.InnkeeperYdrinConversationGroup =8) {
if (flag) {
global.Charisma +=1;
flag = false;
}
}
else {
flag = true;
}
Guidance? Advice? Thanks!
1. The immediate problem. I would like to impact my game with certain dialogue choices. If you choose a rude dialogue path, your relationship with an NPC breaks down, and possible dialogue options filled with a whole host of good stuff disappears.
2. The more long term problem. My object creating the entire dialogue array is loading all the modifiers upon creation. This is obviously not ideal. Using an if statement with a certain statement starts a continuous loop of increased Charisma scores. I would like advice on any resource that is good at explaining GameMaker structure (create events, step events) or a well written book/resource for a programming language that is very similar to Gamemaker (and I have no clue what that language would be) For example:
global.InnkeeperYdrin[8,2]="Thank you for your help!";
global.InnkeeperYdrin[8,3]="Thank you Ydrin. I will help protect the town."; global.Charisma +=1;
global.InnkeeperYdrin[8,4]="I'll do what I can. Goodbye.";
This simply takes whatever you roll for Charisma at the start of the game and adds 1 to it before you access the array. I think I understand: this is in the create event with a global variable. Upon creation it sees this and does what you tell it to. I need to create something separate. So I tried this.
global.InnkeeperYdrinConversationGroup = 1;
This is in the same object. It keeps track of what block of conversations you are on. This prevents the immediate application of the modifier.
But if I put all of this into a separate object with the following if statement
if (global.InnkeeperYdrinConversationGroup = 8)
{ global.Charisma +=1;}
It continuously accesses the state of being on that conversation group until I switch off of it, adding I am assuming 60 charisma per second, based on the room speed.
I have tried things like the following below, but it just accesses the creation event and adds the Charisma, again, off the top. I copied the snippet below, Flag was initialized as true in the create event. This is step code.
if (global.InnkeeperYdrinConversationGroup =8) {
if (flag) {
global.Charisma +=1;
flag = false;
}
}
else {
flag = true;
}
Guidance? Advice? Thanks!