The Daily Click ::. Forums ::. Klik Coding Help ::. perfect 180 degree turn transition
 

Post Reply  Post Oekaki 
 

Posted By Message

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
7th June, 2006 at 01:22:13 -

Doesn't TGF have something equivalent to the "compare two general values" trigger?

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
7th June, 2006 at 04:55:59 -

am i supposed to rotate it for all the directions in the animation editor?

 
Image
http://www.kevinhaag.ca

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
7th June, 2006 at 05:01:43 -

i want it to rotate like the gun in this game:

http://www.ugotgames.com/paratrooper.php

 
Image
http://www.kevinhaag.ca

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
7th June, 2006 at 05:17:52 -

Wow, that's totally not what everyone though you were asking for.

Yes, you'll need to have an animation for each direction, otherwise there's nothing to display and TGF'll use the next-nearest animation.

To do what you want, you'd probably just need to do something like this:

Keyboard: pressed left
+direction("active")<16
---Active: set direction to direction("active")+1

Keyboard: pressed right
+direction("active")>0
---Active: set direction to direction("active")-1

That'll give you 16 possible directions, but you probably want more. So use an active picture and rotate it to the correct angle in a similar way. For the actual shooting, look up an article on 360 degree bullets.

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
11th June, 2006 at 02:53:45 -

i don't think you can have an active picture in TGF... though I could be wrong...

 
Image
http://www.kevinhaag.ca

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
12th June, 2006 at 03:14:35 -

Something I remember doing in TGF for a 360 degree turret was to make the muzzle out of a line of closely-spaced little grey circles that rotate around a central point using trig. There are a couple of ways you can represent it.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click