Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make quests
- sunflower_png
-
Scratcher
48 posts
how to make quests
I'm trying to make quests for a game I'm workinng on but I realized I have no idea how to track theem
- My_Peeps07073
-
Scratcher
100+ posts
how to make quests
If the quests include variables, an idea is:
Basically, you wait until the condition was met, then it gives the broadcast that the quest was completed.
Ideas for the broadcast:
when green flag clicked
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]
Basically, you wait until the condition was met, then it gives the broadcast that the quest was completed.
Ideas for the broadcast:
when I receive [Quest 1 Complete! v]or
change [Quests complete v] by (1)
when I receive [Quest 1 Complete! v]or something like that.
show
- sunflower_png
-
Scratcher
48 posts
how to make quests
If the quests include variables, an idea is:yea but there's a thing that gives you quests so if you do this you could complete the quest before getting itwhen green flag clicked
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]
Basically, you wait until the condition was met, then it gives the broadcast that the quest was completed.
Ideas for the broadcast:when I receive [Quest 1 Complete! v]or
change [Quests complete v] by (1)when I receive [Quest 1 Complete! v]or something like that.
show
- My_Peeps07073
-
Scratcher
100+ posts
how to make quests
So change how the script starts, like this:
when I receive [Quest 1 Given v]Or like this, if the quests are given in a variable:
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]
when green flag clicked
wait until <(Current Quest) = [1]>
wait until <(Points) > [10]>
broadcast [Quest 1 Complete! v]
- sunflower_png
-
Scratcher
48 posts
how to make quests
So change how the script starts, like this:the quests are in a listwhen I receive [Quest 1 Given v]Or like this, if the quests are given in a variable:
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]when green flag clicked
wait until <(Current Quest) = [1]>
wait until <(Points) > [10]>
broadcast [Quest 1 Complete! v]
- My_Peeps07073
-
Scratcher
100+ posts
how to make quests
So what would the items in the list look like? Would it be “Quest 1, Quest 2, Quest 3…” or would it be the requirements, more like “10 points, 25 points, 75 points…”
Could you share the project or at least show what the scripts look like?
Could you share the project or at least show what the scripts look like?
- My_Peeps07073
-
Scratcher
100+ posts
how to make quests
You could make it something like this:
That way, you would be able to organize the list, and have code for when the quest is done or not.
when green flag clicked
wait until <(points) > [10]>
replace item (1 v) of [Quests v] with []
when green flag clicked
forever
if <(item (1 v) of [Quests v]) = []> then
Code for when the quest is complete
else
Quest not complete
end
end
That way, you would be able to organize the list, and have code for when the quest is done or not.
- sunflower_png
-
Scratcher
48 posts
how to make quests
So what would the items in the list look like? Would it be “Quest 1, Quest 2, Quest 3…” or would it be the requirements, more like “10 points, 25 points, 75 points…”https://scratch.mit.edu/projects/1143360890/ look inside the dinosaur sprite
Could you share the project or at least show what the scripts look like?
- My_Peeps07073
-
Scratcher
100+ posts
how to make quests
So you should make some variables that change when an action is completed, like:
For buying macrowaves
And some events for when the quests are complete:
-Buy 20 macrowaves
-Sell 3 items
-Click 2500 times
And you could use the same variables, like:
when green flag clickedAnd some events for when they go up:
set [Macrowaves bought v] to [0]
set [Items sold v] to [0]
set [Clicks v] to [0]
For buying macrowaves
when this sprite clickedFor selling items
if <(Points) > [4]> then
change [Macrowaves bought v] by (1)
change [Points v] by (-5)
end
when I receive [Item sold v]For clicking
change [Items Sold v] by (1)
when green flag clicked
forever
if <mouse down?> then
change [Clicks v] by (1)
wait until <not <mouse down?>>
end
end
And some events for when the quests are complete:
when green flag clickedAnd you could make more quests with higher requirements, like:
wait until <(Macrowaves Bought) > [4]>
do stuff for this quest completion
when green flag clicked
wait until <(Items Sold) > [0]>
do stuff for this quest completion
when green flag clicked
wait until <(Clicks) > [999]>
do stuff for this quest completion
-Buy 20 macrowaves
-Sell 3 items
-Click 2500 times
And you could use the same variables, like:
when green flag clicked
wait until <(Macrowaves Bought) > [19]>
do stuff for this quest completion
when green flag clicked
wait until <(Items Sold) > [2]>
do stuff for this quest completion
when green flag clicked
wait until <(Clicks) > [2499]>
do stuff for this quest completion
- Discussion Forums
- » Help with Scripts
-
» how to make quests


