Page 1 of 1

Worms Shooting Style

PostPosted: Sat Sep 10, 2011 9:55 am
by beginnerirvaz
Hey everyone, Im brand new to GE and would love some advice.

Im wondering if it is possable to have a player shoot like you do in the game worms. So you have a player actor and a enemy actor, you press the screen and drag your finger for direction and power to shoot towards the enmey. I probably should of mentioned I am making an iphone game, actually is it even possable to use GE for touchscreen? or would I have to use buttons?

p.s. so far GE is amazing!

Thanks in advance.

Re: Worms Shooting Style

PostPosted: Sat Sep 10, 2011 3:01 pm
by NERDnotGEEK
Yes this is possible, Im guessing this is your first game? it may be a bit to advanced to go straight into it does involve some thinking, post in the support section if you get stuck but ill give you a few quick points here, I wont spoon feed you it straight away :)

click a drag is easily enough, you can use the built in distance function to find the distance of your current mouse position and where you clicked your mouse. then use that distance to be the power of the shot.

Then a little harder, you can use a small bit of coordinate geometry to work out the angle between where you clicked and your current mouse position.

I wont insult your maths skills just yet by explain how to do this. But the answer to your question Yes, mostly anything 2d is possible with GE if you think hard enough :) good luck

And although im not sure I think that touch screen is possible with ge but not multi touch. But I may be wrong

Re: Worms Shooting Style

PostPosted: Sat Sep 10, 2011 8:26 pm
by skydereign
Touchscreen is completely possible (as it is just a mouse button down event), and even a level of multitouch (limited one though). You though can't have multitouch on a single actor though, so you'd need to filled regions. But, for multitouch to work, you can't deal with xmouse, ymouse, FollowMouse, or anything similar (unless it is guaranteed to be the second touch). If you don't need that, then multitouch will work fine.

Re: Worms Shooting Style

PostPosted: Sat Sep 10, 2011 9:57 pm
by schnellboot
real quick example here