FireProjectileComponent with Platformer Starterkit
by Do Not Delete · in Torque X 2D · 07/14/2007 (12:17 pm) · 17 replies
I tried to add the FireProjectileCompontent from the Blaster Tutorial to my platformer starter kit project and it won't work. I added the component to my player but nothing happens when I press Enter. (I changed the buttons). Can anyone help me?
About the author
#2
And it goes to the { and stops.
07/16/2007 (10:40 am)
I put the breakpoint in public virtual void ProcessTick(Move move, float dt)
And it goes to the { and stops.
#3
07/16/2007 (12:11 pm)
Is move null?
#4
07/16/2007 (2:10 pm)
Yes it is.
#5
08/21/2007 (3:01 pm)
What do I do if move is null?
#6
08/21/2007 (3:57 pm)
@Dro - What's happening is that the FireProjectileComponent doesn't have a movemanager associated with it, probably because the platformer starter kit and the blaster tutorial set up their input in different ways. The FireProjectileComponent in the tutorial expects that the setup done by the MovementComponent in that tutorial will set up some of its input stuff (specifically, the stuff it does with the PlayerManager). The platformer kit does things a bit differently. To work with the Platformer kit, it's probably best to try to continue the way it sets up input.
#7
08/25/2007 (1:41 pm)
I am trying to do the same thing and kind of get what your on about but in the last sentance i dont understand
#8
pastebin.com/m4d0a688a
08/25/2007 (8:41 pm)
I put the code up on Pastebin. If anyone wants to fix it and make it work that would be great. I've tried everything I can.pastebin.com/m4d0a688a
#9
were and how do i change the shoot button in the tutorial 4 blaster its space bar but that is how the dragon jumps .do i have to have a projectile component and a movment component .
Whats the difference in projectile and firebullet component r they just 2 components that work together.
08/26/2007 (4:20 am)
FIREBULLET COMPONENT I HAVE CREATED THAT .Then i add it to the dragon but nothing were and how do i change the shoot button in the tutorial 4 blaster its space bar but that is how the dragon jumps .do i have to have a projectile component and a movment component .
Whats the difference in projectile and firebullet component r they just 2 components that work together.
#10
08/26/2007 (8:34 am)
Firebulletcomponent is the same thing. I just changed the name of it :)
#11
x-box.then once it works does it kill the enemys.
08/26/2007 (11:59 am)
So i attach the component to the dragon right.How do i difine a new button 4 the character im not using x-box.then once it works does it kill the enemys.
#12
08/26/2007 (12:16 pm)
I PLAY IT IN THE VISUAL STUDIO WITH THE ATTACHED TO THE DRAGON BUT NOTHING NO BUTTON
#13
08/26/2007 (12:22 pm)
SORRY I WENT TO PASTE BIN AND THERES TWO PAGES THERE IS THE SECOND THE SOLUTION .ITS all new to me .how come i can copy and paste the script straight from paste bin into c# but normally not it saves allot of time.i hope it all works i wish the demo came with this stuff worked out .cheers
#14
Code:
Can anyone help?
Thanks!
09/03/2007 (4:59 pm)
I've been tinkering around with this and decided to add the code to the Player Controller.cs file. There is one problem though, it can't find SceneObject. The SceneObject in our case is the Dragon. What would the equivilent of SceneObject be in our case?Code:
// Set the position based on the position of the object that's shooting.
projectileObj.Position = SceneObject.Position;
projectileObj.Layer = SceneObject.Layer + 1;Can anyone help?
Thanks!
#15
09/04/2007 (4:32 pm)
Anybody?
#16
10/02/2007 (1:33 am)
I didn't see this. Check out my FiringAI in the platformer forum and mix it with the guy adding a new state.
#17
10/02/2007 (4:35 pm)
What's the difference between mine and yours?
Torque Owner Dan Maruschak