Scrolling Game Development Kit Forum
Welcome,
Guest
. Please
login
or
register
.
2010-09-09, 05:35:42 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
8920
Posts in
1007
Topics by
168
Members
Latest Member:
mogzdogz
Scrolling Game Development Kit Forum
SGDK Version 1
General Discussion
targeter/aiming
« previous
next »
Pages:
[
1
]
Author
Topic: targeter/aiming (Read 2021 times)
bat
Fanatic
Posts: 229
Cheak out the B*t project
targeter/aiming
«
on:
2006-07-28, 02:03:58 PM »
how would i make a targeter thing to aim with right in front of a character (mario type side scroller)?
like in this game (worms2):
Logged
~bat
durnurd
Lead Lemming
Expert
Fanatic
Posts: 1155
Games completed so far: 0
Re: targeter/aiming
«
Reply #1 on:
2006-07-28, 02:07:46 PM »
controled by the mouse or the keyboard?
Logged
Ed
wa
rd
Da
ss
me
ss
er
bat
Fanatic
Posts: 229
Cheak out the B*t project
Re: targeter/aiming
«
Reply #2 on:
2006-07-28, 02:20:12 PM »
either or...
but keyboard would be best
Logged
~bat
bat
Fanatic
Posts: 229
Cheak out the B*t project
Re: targeter/aiming
«
Reply #3 on:
2006-07-29, 06:37:14 PM »
would having an object (targeter) follow the player work?
Logged
~bat
bat
Fanatic
Posts: 229
Cheak out the B*t project
Re: targeter/aiming
«
Reply #4 on:
2006-07-29, 06:49:21 PM »
even just a "snap to" left,right and above would be ok
Logged
~bat
bluemonkmn
SGDK Author
Administrator
Fanatic
Posts: 2146
Re: targeter/aiming
«
Reply #5 on:
2006-07-30, 07:30:22 AM »
Is scripting an option here? Because you could make a script that detects when you are pressing left or right, and if you are, it can continuously decrease the angle or increase the angle. Then to position the "targeter sprite" you get the location of the player sprite and add some offset like this:
TargetSprite.X = PlayerSprite.X + Cos(AngleRadians) * 100
TargetSprite.Y = PlayerSprite.Y - Sin(AngleRadians) * 100
As the player presses left or right, you would increment or decrement AngleRadians by small amounts like:
AngleRadians = AngleRadians + 3.14159265 / 18
Logged
Ben Marty
Scrolling Game Development Kit 2
bat
Fanatic
Posts: 229
Cheak out the B*t project
Re: targeter/aiming
«
Reply #6 on:
2006-07-31, 12:17:45 AM »
cool! that's wut i was looking 4! thanks.
Logged
~bat
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SGDK Version 2
-----------------------------
=> News and Announcements
=> Help, Errors, FAQ
=> General Discussion
=> Projects
-----------------------------
SGDK Version 1
-----------------------------
=> News and Announcements
=> Help/FAQ
=> General Discussion
=> Script
=> Projects
-----------------------------
General
-----------------------------
=> Game Development Artistry
=> Off-Topic
Loading...