I’m trying to make a patch at the moment which is kind of like those dancing
games you see in arcades. I’m stuck… wel at the very begining… I was
wondering what would be the best way to get something to light up on the
screen for x amount of time, and allow it to recieve a mouse click? And that
if it isnt clicked in the amount of time, nothing happens.
I.e A piece of the patcher would light up, and you have x amount of time to
click it to get your points. What are my options for going about this?
The timer object is what you need.
Take a look at this :
First click the start button, if you click on stop within 5 seconds nothing happens, if you click after 5 seconds the ">" object will output one :
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 130 109 31 9109513 stop;
#P button 130 130 15 0;
#P toggle 111 277 15 0;
#P newex 111 241 36 9109513 > 5000;
#P number 111 213 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 111 130 15 0;
#P newex 111 178 29 9109513 timer;
#P comment 104 109 31 9109513 start;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 1 0 3 0;
#P connect 2 0 1 0;
#P connect 6 0 1 1;
#P window clipboard copycount 8;
A really effective way of going about doing that would be to use the LCD
object. I’ve recently just started delving into it myself and it is
extremely versatile. It could easily do what you need.
I was wondering about the LCD thing, but does that recognise a mouse click
in a certain area of it when a drawn object appears? An can you control what
happens after you click on the drawn object. I was under the impression that
the lcd is useless because it lacks interactivity.
To Nathanael, do you think if i used the timer object with pictctrl objects,
I may be able to achieve what im looking for?
At the moment I have 40 pictctrl objects being lit up from 1 to 40, at
random by urn, but how would I get all 40 to turn off individually after a
set amount of time they have been on? Also, is there an option to make the
pictctrl object not responde once its not lit up. Im asking this because I
dont want anything to happen if the user accidently clicks on a pictctrl
that isnt lit up, when they are rushing to get the correct lit up one.
Really really appriciate all your help on this lads, its important to my
studies at the moment in college.
> I was wondering about the LCD thing, but does that recognise a mouse click
> in a certain area of it when a drawn object appears? An can you control what
> happens after you click on the drawn object. I was under the impression that
> the lcd is useless because it lacks interactivity.
[lcd] has one outlet for mouse down positions, and one
for idle mousing positions.
idle mousing has to be activated with a "idle 1" message
to the lcd object.
when you click into lcd you will always know where you
click, because a click is already triggering the mouse
the job you described is perfect for lcd – you only have
to compare the center position of your spaceship rectangle
with the click location and you know if you hit it. :)
– Planet 110
Hey roman, thanks for the info…
I was just wondering, I’m a real beginner at most of this, and especially
the LCD… I was wondering could you outline in a bit more detail how I
could go about doing this with the LCD..
Very much appreciated,
Forums > MaxMSP