Discuss Scratch

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:
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]
change [Quests complete v] by (1)
or
when I receive [Quest 1 Complete! v]
show
or something like that.
sunflower_png
Scratcher
48 posts

how to make quests

My_Peeps07073 wrote:

If the quests include variables, an idea is:
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]
change [Quests complete v] by (1)
or
when I receive [Quest 1 Complete! v]
show
or something like that.
yea but there's a thing that gives you quests so if you do this you could complete the quest before getting it
My_Peeps07073
Scratcher
100+ posts

how to make quests

So change how the script starts, like this:
when I receive [Quest 1 Given v]
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]
Or like this, if the quests are given in a variable:
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

My_Peeps07073 wrote:

So change how the script starts, like this:
when I receive [Quest 1 Given v]
wait until <(points) > [10]>
broadcast [Quest 1 Complete! v]
Or like this, if the quests are given in a variable:
when green flag clicked
wait until <(Current Quest) = [1]>
wait until <(Points) > [10]>
broadcast [Quest 1 Complete! v]
the quests are in a list
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?
My_Peeps07073
Scratcher
100+ posts

how to make quests

You could make it something like this:

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

My_Peeps07073 wrote:

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?
https://scratch.mit.edu/projects/1143360890/ look inside the dinosaur sprite
My_Peeps07073
Scratcher
100+ posts

how to make quests

So you should make some variables that change when an action is completed, like:
when green flag clicked
set [Macrowaves bought v] to [0]
set [Items sold v] to [0]
set [Clicks v] to [0]
And some events for when they go up:

For buying macrowaves
when this sprite clicked
if <(Points) > [4]> then
change [Macrowaves bought v] by (1)
change [Points v] by (-5)
end
For selling items
when I receive [Item sold v]
change [Items Sold v] by (1)
For clicking
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 clicked
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
And you could make more quests with higher requirements, like:
-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
JoelgamerUwU
Scratcher
1 post

how to make quests

sigma
sunflower_png
Scratcher
48 posts

how to make quests

JoelgamerUwU wrote:

g
isn't that necroposting

Powered by DjangoBB