Collection quest

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
598
Reaction score
418
First Language
English
Primarily Uses
I don't think I have seen a topic like this in the forum yet, so I am wondering if anyone can give me a pointer or two about how to get around my issue..

Lets say that I have a quest asking the player to collect 5 apples

The player can only gather the apple when the quest is active

The player can obtain no more than one apple per tree

The tree will stop giving player apple once the objective is met

The quest is repeatable, so I will need to reset the tree back to its original state

Based on the above points, I concluded that I need at least 3 event pages

First page is for when the quest is inactive:



Second page is for when the event is active and player have not interacted with the tree yet



3rd page is for after the player collected an apple from the tree



What I would like to know is whether there is a method for me to turn the self switch A off to reset the event back to page 1 after I turn in the quest? I know that I can make a 4th page or something with some checks and then turn the self switch A off, but that means the player has to interact with the event twice and that feels a little unprofessional.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
There are several scripts available that allow you to toggle self-switches, but I think the headache is about the same as doing it manually with a switch for some pages for each tree.

So assuming there are five trees that can bear apples, that would mean we would need 6 switches total for your apple quest.

Trees 1-5 would have three pages, page 1 would be the page in which the player would be given the apple (no switch needed for this page), page 2 would be the page where they can no longer get another apple because they already got it (need 5 switches here, one for each tree), and page 3 would be the same for all 5 trees for when the quest is not available.

I'm sure someone else on the forum can submit a more efficient way, but I think just manually using the 6 switches will be simple enough to be worth it. You won't need any self-switches,
 

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
598
Reaction score
418
First Language
English
Primarily Uses
Hmm seems like your idea for page 3 is the same as my page 1, and I combined your page 1 and 2 into a single page for when the quest is active and the player has not interacted with the trees yet. I have a conditional statement to check if the requirement has been met before giving the player an apple.



If I am understanding you correctly, you were saying that I introduce a secondary switch which can be triggered upon the completion of the quest by the quest NPC which would reset all the trees?

Thanks for the input

Edit

I have included my test run map just in case it makes it easier

Test runs.rar
 

Attachments

Last edited by a moderator:

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Good point, you don't even need 6 switches 5 will do if you use a conditional branch for the first page. The point I was trying to make is that you don't need any self-switches here, at all. Are there any more issues to be resolved or is this solved?
 
Last edited by a moderator:

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
598
Reaction score
418
First Language
English
Primarily Uses
The issue still exist lol.. Stuff came up and I didnt get a chance to mess with it since my last post..
 

Kalin

Veteran
Veteran
Joined
Jul 24, 2015
Messages
81
Reaction score
23
First Language
English
Primarily Uses
I'm doing something similar in my current project. Try this:

Page 4

parallel process

Conditions: Switch 0002:Reset5AppleQuest is On AND self switch A is On

Commands: Set self switch A to Off

Then back on page 2 where you pick an apple, add a line with: Set switch 0002:Reset5AppleQuest to Off
 

Sinweaver

Veteran
Veteran
Joined
Aug 11, 2015
Messages
598
Reaction score
418
First Language
English
Primarily Uses
Thanks Kalin, that is exactly what I am looking for.. but I made the mistake of not using parallel processing..


However, you solution missed something... if you turn the resetapplequest switch off on page 2, the condition on page 4 will never be met since resetapplequest is already turned off.


So I added resetapplequest switch to the quest giver which will be switched on when the player turned in the quest and voila.. it worked.


Here's what my working codes looked like:

Quest giver:





Apple trees:











Edit:


I was going to mark your post as the answer, but I dont want the missing switch to get in the way.


Thanks again..
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top