hi.
starting a scene there are e.g. 5 objects visible.
each object can be clicked.
now a timer should start by the FIRST mouseclick on an object only.
in this example the following 4 mouseclicks should be ignored by the timer, which means the timer should continue from the first click till all other objects are clicked.
(problem: at the moment in my script the timer starts again from the beginning by each click…)
hi.
could you please advise with a step by step procedere?
as a newbie and no-programmer i cant program this…
and: in this example there can be a lot more clicks like 5, nobody can know how much.
so the simple counting would not help.
I create and pause the timer (the creation happens with the pause action),
I create a scene variable click_count and set it to 0 (this is as the name implies the counter for the clicks).
I also generate a random number of objects (between 1 and 5) at random positions on the screen.
Then I use the expression SceneInstancesCount() which gives the number of instances of my object that are on the screen and I store this value in the scene variable objects_on_screen.
When I click the object:
the timer is unpaused (now it is running)
the scene variable click_count is increased by 1
I delete the clicked object (to have a visual confirmation that I clicked all objects)
When the scene variable objects_on_screen equals the number of my clicks which I stored in the scene variable click_count:
the timer is paused (you can use any action you like here)
hi.
first of all: WOW and thanks again drona.
i will test that asap.
and of course i am reading tutorials before asking, BUT
as i said it before: as a newbie/non-coder you would NEVER found such a solution…
.cu.
me again… sorry.
but this is TOO complicated for me.
because i dont know what i am doing…
will have a look for an other solution.
anyway.
thank you so much for your help!