Shooting
by Steven Sheffey · in TGB Platformer Kit · 08/01/2008 (4:36 am) · 9 replies
Hello everyone. Im pretty new to TGB so Im sorry for the noob questions but any help or point in the right direction would be greatly appreciated.
I added the ShootsBehavior to my character. Unfortunately when I fire, the projectile shoot from my characters initial spawn point. Obviously I would like to have the projectile fire from wherever position my character moves to. I will keep hammering away at this and hopefully figure out whats up.
Thanks in advance!
I added the ShootsBehavior to my character. Unfortunately when I fire, the projectile shoot from my characters initial spawn point. Obviously I would like to have the projectile fire from wherever position my character moves to. I will keep hammering away at this and hopefully figure out whats up.
Thanks in advance!
#2
-Steven
08/01/2008 (8:49 am)
Hey Patrick, so looks like it worked. At first the dragon was gliding due to "Space" being bound to both jump and fire in the controllerBehavior and shootsBehavior. So I ended up changing the jump from "Space" to "W" in the controllerBehavior and everything seems good! Thank you very much! =)-Steven
#3
08/01/2008 (9:14 am)
Happy to help!
#5
http://tdn.garagegames.com/wiki/TGB/PlatformerStarterKit/Animation_Tutorial
11/08/2008 (5:08 pm)
Try this, better than the behavior IMHO:http://tdn.garagegames.com/wiki/TGB/PlatformerStarterKit/Animation_Tutorial
#7
12/08/2008 (12:23 pm)
Are you sure this works? I just tried it out with my custom character and when I push the shoot button the animation doesn't play. Is this still just a place holder?
#8
The problem I have is actually making the shot come out. When I use the ShotsBehavior it fires directly up. I tried to manually edit the angle value but it doesn't work. How have others figured this out?
EDIT: Lesson learned, just followed the shoot tutorial and make sure the imgame name doesn't have any special characters in it (I had an underscore) and it'll work, yay.
12/08/2008 (7:59 pm)
Hmmm, I redid the code, made sure there was no spaces and all tabs in ActorBehaviors, works like a charm now!The problem I have is actually making the shot come out. When I use the ShotsBehavior it fires directly up. I tried to manually edit the angle value but it doesn't work. How have others figured this out?
EDIT: Lesson learned, just followed the shoot tutorial and make sure the imgame name doesn't have any special characters in it (I had an underscore) and it'll work, yay.
#9
12/11/2008 (12:05 pm)
Cool, glad you got it working!
Torque Owner RollerJesus
Dream. Build. Repeat.
If you want to use a spawn point and add that behavior to the player, you should try adding the behavior to the dragonTemplate.
Look in the dragonTemplate datablock and find where the other behaviors are added, then do the same thing for the ShootsBehavior.
Should do the trick.
'Patrick