[Tutor] a pyball python app
Kent Johnson
kent37 at tds.net
Thu Apr 3 16:34:26 CEST 2008
dean garrad wrote:
>
>
> this is the part im lil confused about to add the extra ball
>
> location=[img.size[0]/2,img.size[1]/2]
> speed=[0.,0.]
> i tried copying but it did nothing do i need to copy it and change
> something so the python app dont read the same txt twice and jus do nothing?
If you want to just copy/paste, you will have to copy all the lines
using location and speed and change the copies to something like
location2 and speed2. Of course you should also change the starting
location or speed so the two balls don't draw in the same place!
> also on the txt bellow if i add another bal somehow i dotn have to copy
> or change the txt bellow do i? it should create same value for both balls?
You have to duplicate all the location and speed code, using the new names.
> also could you link advise any good tuturials that would help me ive
> read some on the net but need more help really.
The first two tutorials listed here are popular:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Kent
PS Please subscribe to the list so I don't have to moderate all your
requests through.
More information about the Tutor
mailing list