simple pointer demo(how to make an actor point to another...

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

simple pointer demo(how to make an actor point to another...

Postby Sgt. Sparky » Wed Jul 04, 2007 5:53 pm

actor,
it is VERY, VERY simple. :D
to make the pointer point at another actor just change the code on the draw actor event of your pointer to,
Code: Select all
animpos = direction(x, y, yourotheractor.x, yourotheractor.y) / 10;

:D
the reason I made this Dmo is because so many people ask how to rotate an actor,
so other people have to answer again and again each time.
Attachments
PointerDemo.zip
(78.33 KiB) Downloaded 330 times
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby 98700 » Wed Jul 04, 2007 11:54 pm

this was so helpful im giving u a point :!: :!: :!: :!: :!: :!: :)
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby 98700 » Thu Jul 05, 2007 12:22 am

ok well it goes the oposite direction of my mouse(btw in ge it shows 104 frames lol)
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Sgt. Sparky » Thu Jul 05, 2007 12:52 am

you have 104 fames?
then you must change your code at the end from / 10 to / 3.461538 or just to / 3.46. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby 98700 » Thu Jul 05, 2007 5:47 pm

lol thx 1 point 4 u :!:
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Sgt. Sparky » Thu Jul 05, 2007 11:19 pm

you are welcome. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby 98700 » Fri Jul 06, 2007 2:16 pm

well there is still ine problem tho it still goes the oposite direction...
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Sgt. Sparky » Sat Jul 07, 2007 7:24 pm

what code do you use and how many frames does it have?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby 98700 » Sun Jul 08, 2007 6:36 am

103 frames and code=
Code: Select all
animpos = direction(xscreen, yscreen, xmouse, ymouse) / 3.46;
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Sgt. Sparky » Tue Jul 10, 2007 3:15 am

does it start facing right and rotating left?
if not you have a problem. :(
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby 98700 » Sat Jul 21, 2007 2:21 pm

lol i got it i made it turn the wrong direction :lol:
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Sgt. Sparky » Sun Jul 22, 2007 10:44 pm

Yay!
:D

wait, does it work now?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Freddy » Tue Aug 07, 2007 1:41 am

I tried downloading the demo, but my dumb computer wont extract almost all of the demos people make! :x :x But I really want to know how to rotate an actor! :(
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score

Postby Sgt. Sparky » Tue Aug 07, 2007 5:14 pm

Freddy wrote:I tried downloading the demo, but my dumb computer wont extract almost all of the demos people make! :x :x But I really want to know how to rotate an actor! :(

look at the Asteroids Demo on the Demo page. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest