Game Development Community

Making my character shoot his enemies

by thejamesanderson · in Torque X Platformer Kit · 08/12/2007 (3:56 am) · 10 replies

I have recently purchased the Platformer Starter kit.

At this point I have created an actor that can do most of the things that the dragon can do. I want to make a game that is similar to mega man where the player can shoot at the enemies.

So my question is how do I make my character shoot things.

I know that I should create an animation of the character shooting and then add it as an action. BUt what about having the enemy actors react to being shot.

In addition to this I want the character to be able to duck and shoot. As well as shoot at enemies while running away frm them. Like if the enemy is coming at the player fast and the player needs to run but wants to damage the enemy at the same time.

Some other points to this question would be any tips on shooting at 46 degree angles.

Any help pointing me down the right path would be appreciated.

:)

James

#1
08/13/2007 (7:01 pm)
For basic shooting check out the blaster tutorial and try to add that to your game :)
#2
08/26/2007 (2:18 pm)
You say try to add the shooting to game but a few people including my self r tring i have a bullet component but i think to get it to go side ways and colid with the drill is hard no one says they have done it wy dont they incude that with the strter kit .they mention mega man ,I hope some one can explain this in a forum or some were.
#3
08/26/2007 (2:52 pm)
Yeah, I am pretty frustrated about the situation. It seems like it should be easy enough to do but what we really need is a good clear tutorial about how to do it. I emailed the maker of the Starter Kit but I have not gotten a response yet.
#4
08/29/2007 (9:08 pm)
Sorry it took me a couple days to reply, I've been out of town. >_<;

Anyway, all you have to do is give your projectile component your OnCollision delegate and then check if it collides with an enemy by testing the other object's object type. If so, find the other object's ActorComponent and call TakeDamage on the their ActorComponent with the appropriate amount of damage. That's it!

If you set up your enemies properly, they should automatically switch into their death state when their health reaches zero. You can customize how much health different actors have using the MaxHealth property.
#5
08/30/2007 (3:02 am)
Can u answer how do i attach a button 4 it on the keyboard .what do i change in C# 4 that do i change the blaster tutorisl z to y axis
once u have a set up 4 one character eg.gun sword 4 a enemy u can use the same templete and just make them stronger 4 the bosses
cheers
#6
08/30/2007 (2:21 pm)
The starter kit is by no means the end-all for platformer games - it's just a starting point. The tutorials are sufficient to get a moderately inexperienced programmer started, but we're generally not in the business of writing people's games for them. I don't mean this as a "do it yourself, lazy ass" response, it's really for your own benefit.

I'm sure there are people in the community that can answer these questions and I don't mind occasionally poking my head in to help out with the more difficult questions but honestly, you guys will be much better off if you bite the bullet and just dig into the code and learn it. It's much more rewarding and you'll be able to work much more efficiently in the long run.

If you're not interested in programming at all, you won't be able to make any custom modifications to the kit on your own. That's the bottom line. If that's the case, I suggest getting together with a programmer you can work with, hammering out the details of your game, and working from there. Although I have seen it happen when people are feeling especially generous (I've even done it myself), you're not very likely to find someone (GG employee or otherwise) willing to write extensive code for someone else's project for free with no credit. You'll be much more successful if you invite people to work with you, than asking them to work for you (especially if you're not offering any incentives).
#7
08/30/2007 (5:49 pm)
Thomas,

I have decided to partner up with a programmer and share skills. A code for art sort of thing. It hink its a good idea that will work for me.

I do however think that it would be helpful to the community to have more tutorials that show how to make things like shooting work.

I learned how to make my own player controlled actor by reading the tutorial that came with the platformer starter kit.

So tutorials about how to extend the kit just seem like a natural thing to be added by the developers.

I by no means want other people to do my work for me, but if there was a tutorial about how to make a bass encounter then I would do it, and then mold it to be something that I wanted.
#8
08/30/2007 (6:03 pm)
That last line meant to say "boss" encounter not "bass" encounter. I am sure that I could encounter some bass on my own, LOL.
#9
08/30/2007 (6:12 pm)
Tutorials are something that we desperately need more of, I agree. I'm glad you found someone to work with. Please continue to post any questions and post back with updates with your progress. I'm sure there are plenty of people here, myself included, who would love to see what people come up with.
#10
07/22/2008 (1:54 pm)
Since I have 'some' time on my hands, and TDN seems pretty empty. I'm making some articles; and need to know what is the one main problem that people are getting in creating a boss ??