Page 1 of 1

Stuck with own game

Posted: July 22nd, 2012, 1:15 pm
by Lorth
Hey guys!

i have started a own little game which i have plans to expand alot in the future, but so far i make small steps to work with all my ideas.

Right now i am stuck.
so far i got a controlled Player that is able to move around the screen with WASD, i also got targets to kill randomly placed, the targets stand still at the moment.
I am also able to shoot a fireball that aims towards the mouse, as intended.

but now i wanna make the player have a sword to swing and to kill the targets.

i made a small figure of a sword with the drawline function, but i can't get it to hunt the mouse. i only get it to draw to the left side of the player, and that makes me only able to kill targets that is placed on the right side of my player...

Anyone that can assist me with this part before all my hair is gone :D
//Lorth

Re: Stuck with own game

Posted: July 22nd, 2012, 2:18 pm
by LuX
You're asking a lot here ; -P

If you already managed to get the fireballs working, then getting the sword working shouldn't be too hard...

But if you need some help, just upload what you've got and ask for something specific.

Re: Stuck with own game

Posted: July 22nd, 2012, 2:22 pm
by chili
Yes! Questions should be specific. Preferably with code.

Re: Stuck with own game

Posted: July 22nd, 2012, 3:02 pm
by Lorth
Here is the game so far that i work with

there is alot of improvments that i work on as this is my first bigger game made...

but as i asked before, i trying to work the swinging sword part so i can swing a sword while my Player is a warrior, he can be changed to mage with button 2, and a healer with button 3

to assist anyone trying it out :D
button used are:
Moving WASD,
First attack on left mouse button,
2nd attack with right mouse button (if there is anyone, havent made all attacks yet)

change class with 1,2,3,4

use ultimate with space when got 10 counters, (atm only restore mana or energy or health depending on class used)
while in Ranger( number 4 the yellow one) press TAB to swith to melee, not yet completed switches to fast...

Re: Stuck with own game

Posted: July 25th, 2012, 11:21 am
by chili
You'll need to keep track of all the points used to draw the sword, and them rotate them to face the pointer. How is your trigonometry? :lol:

P.S. Looking good so far bro.