| View previous topic :: View next topic |
| Author |
Message |
Xanatos I post too much
Reputation: 18
Joined: 06 May 2007 Posts: 2559 Location: US
|
Posted: Wed Jun 27, 2007 5:59 pm Post subject: [Issue] Help? =| |
|
|
I can't seem to get one of the functions to work properly. The project is a game where you use your mouse to avoid the enemy. Right now the sprites are simply red and white boxes. White = you, Red = Enemy. The enemy is designed to chase you.
The problem is controlling the player - It doesn't work. I know the code is right - at least for the older version of Delphi but something went wrong.
Also if it helps I'm using a touchpad so (this is a little "out there") maybe the function isn't compatible with a touchpad. But when I hook up a mouse it doesn't work either. Try testing it if you have a mouse only.
Note that I only have 5-6 hours of programming experience (in total time).
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Thu Jun 28, 2007 5:21 am Post subject: |
|
|
hmm, dont work for me either, also do so you cant resize your form :\
but what codes is used to make programs like that? which tutorial do you use.
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Jun 28, 2007 8:23 am Post subject: |
|
|
make it so when the mouse moves the char sprite moves to the mouse position
then if the char sprite's choords are touched by the enemy, you get pwnz0rzed
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Jun 28, 2007 8:55 am Post subject: |
|
|
OMG A BREAKTHROUGH! I MADE IT MOVE! i did but it never happened again, glitch...
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Xanatos I post too much
Reputation: 18
Joined: 06 May 2007 Posts: 2559 Location: US
|
Posted: Thu Jun 28, 2007 9:46 am Post subject: |
|
|
| blankrider wrote: | make it so when the mouse moves the char sprite moves to the mouse position
then if the char sprite's choords are touched by the enemy, you get pwnz0rzed |
I did. I used the function that was specified to use. Except it doesn't work propery with the new version of Delphi. It used to on the old though. My question is: is there an alternative way I can achieve the same effect? I've been working on it for quite some time and it isn't working. Also @ Kevinn I know about that resizing stuff, I'll do it when I get to it in the tutorial Which is at the end of 2 and a half hours >.<.
The tutorial I used was the Delphi lesson 3 on 3Dbuzz (see my other thread for the link).
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Thu Jun 28, 2007 10:34 am Post subject: |
|
|
Proper way to go about this is with a mouse hook. then in the hookproc set the player's 'left' and 'top' according to lParam->pt->x and lParam->pt->y
(don't know how to do that in delphi, and the examples on the net gave me access violations so maybe you should put it in a dll)
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Jun 28, 2007 10:57 am Post subject: |
|
|
Note that I only have 5-6 hours of programming experience (in total time).
there you go appal
lol
_________________
|
|
| Back to top |
|
 |
Xanatos I post too much
Reputation: 18
Joined: 06 May 2007 Posts: 2559 Location: US
|
Posted: Thu Jun 28, 2007 8:22 pm Post subject: |
|
|
Uhh yeah what ^he^ said.
Any solves that are possible by me?
I guess not. =|
If you want to edit it in than feel free to. +1 rep if you succeed.
_________________
|
|
| Back to top |
|
 |
|