On 2/5/07, *Luke Paireepinart* <rabidpoobear@xxxxxxxxx
<mailto:rabidpoobear@xxxxxxxxx>> wrote:
On 2/5/07, *Charles Christie* < sonicbhoc@xxxxxxxxx
<mailto:sonicbhoc@xxxxxxxxx>> wrote:
I would like to ask you guys another question. If you feel in
the mood to help me out, feel free... but it turns out that I
don't have as much time as I had hoped, because they (my
teachers) want something I can demonstrate out by early May.
>.< I need to get moving on this, and find some sprites if I
can't contact my cousin any time soon...
Is there any way to get pygame to get the right y coordinates
of a rect? because I would like to have my text on the right
side of the screen and if I knew how to get that, it would be
a walk in the park. I know you can do it with some sort of
freaky math but I'm trying to figure out how. I'm pretty sure
if I googled it longer I could have figured it out but I have
1 minute before I have to get out of this classroom...
A more difficult problem is the timers. I would like to have
three of them, but I don't know how to use the
pygame.time.Clock() other than setting a framerate. Does
anybody have an example of how to use pygame.time.Clock () to
keep track of how much time has elapsed since an event and
only start after everything else has loaded? Because it would
suck to have the clocks start while the program is still
loading. That would ruin people's scores.
It's actually really simple to create custom timed events.
so after you load all your data, make the events.
for example, if you wanted to subtract fuel from the player every
second & set a max time limit at 150 seconds, add a custom event
that will trigger every second.
then in your event processing, if the event has occured, decrement
fuel and increment timeLimit. When this reaches 150, end the
program or whatever.
look at pygame Event docs.