![]() |
|
10-08-2012
|
1 |
|
Registered User
Join Date: Dec 2011
Location: Blacksburg, Virginia
Posts: 5,459
|
Python Help
I'm creating my first Python game, but I've run across a problem. The game makes you feed the Apple's logo to Steve Jobs' head. The problem is that I have to give the apple to the exact x,y coordinate to win. It's a really small location. I want to have a bigger win area. Maybe a win area as a rectangle around his mouth. Here's the code I have so far for the win. It works so far with my code so I won't show you the whole thing. Currently, the apple follows your mouse's position, so that's what pos is for. PHP Code:
|
|
10-08-2012
|
2 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Not familiar with python, but try using coordinates like this : PHP Code:
|
|
10-08-2012
|
3 |
|
Registered User
Join Date: Dec 2011
Location: Blacksburg, Virginia
Posts: 5,459
|
Thanks, I will try something like that right now. I don't think that works with my code. I will attach the whole thing. PHP Code:
|
|
10-08-2012
|
4 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Remove win and use it as I told ya, win = 1 pixel in your current script. Which is practically in-accurate correctly, python seems fun :o
|
|
10-08-2012
|
5 |
|
Registered User
Join Date: Aug 2011
Location: En La Caja
Posts: 1,679
|
|
|
10-08-2012
|
6 | ||
|
Registered User
Join Date: Dec 2011
Location: Blacksburg, Virginia
Posts: 5,459
|
|
||
|
10-08-2012
|
7 | |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Well yeah, even tho Python is a global language, it's not the best for creating games unless you like to code something from the scratch. I'd say C# / C++ is the best objective to use in these kind of situations, he'll even VB could make it easier :p (P.S : all languages are familiar if you already know Gs2 since its rather a combination of C# and Java) |
|
|
10-08-2012
|
8 |
|
Guest
Posts: n/a
|
|
|
10-08-2012
|
9 |
|
.47
Join Date: Jul 2012
Location: Wundahland!
Posts: 1,921
|
|
|
10-08-2012
|
10 | ||
|
Registered User
Join Date: Dec 2011
Location: Blacksburg, Virginia
Posts: 5,459
|
|
||
|
10-09-2012
|
11 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
C++ is only good for offline games, you can get much more server triggers script using C sharp. Did the script work? |
|
10-09-2012
|
12 |
|
Registered User
Join Date: Apr 2012
Posts: 347
|
|
|
10-10-2012
|
13 |
|
Registered User
Join Date: Apr 2016
Location: Testbed
Posts: 604
|
|
|
10-10-2012
|
14 |
|
:)
Join Date: Sep 2011
Location: no.
Posts: 10,309
|
|
|
10-10-2012
|
15 | ||
|
Registered User
Join Date: Dec 2011
Location: Blacksburg, Virginia
Posts: 5,459
|
|
||