Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Killing Monsters

Author
Message
badkneecap
14
Years of Service
User Offline
Joined: 21st Jun 2010
Location:
Posted: 18th Aug 2010 15:54
I've been working on my first game using the huge dungeon example. I have it where I can build my own maps and add monsters and run around going up and down levels. I now want to add in the ability to kill monsters and I'm looking for some general direction on how to do this.

1. How do I add in graphics, like a sword so that I can swing it and kill the monsters?
2. How do I animate it so that it looks like it's swinging?
3. How do I determine if it was actually hit?

Also, I am confused about something. It seems that all I am doing is moving around the camera, not a player. I am using Dark AI to create monsters that move around a path. If all I am doing is moving the camera around, will the monsters ever see me as an enemy and attack? Is this the right way to do things?
MikeRK
14
Years of Service
User Offline
Joined: 18th Aug 2010
Location: United Kingdom
Posted: 18th Aug 2010 16:48
In a words, No.


I don't own Dark AI (since I prefer to do my own AI), but I can assume you need to tell it what the monster would be looking for.

For instance (In a general context);

If you have Object 1 as the player, and Object 2 as the monster,
You would need to register these objects as characters in game, so that the AI system can control the monster to keep an eye out for the Player.

As for adding Graphics like swords, and animating them, you'll have to get an understanding of Content Production, be it 3D or 2D.

If it's 3D, then you would need a Sword model, load it, and programatically attach it to the Player model, and develop animations (either 3D, or programatically) and depending on the Player action (i.e. Thrust Sword), run the animations accordingly.

Then to detect if the player has hit a monster, you can logically do it like this;



Now this is the basic of basic of how to do it, though you would want to put in place such things as making sure Hit Monster will only equal 1 per Sword Thrust etc.

Mikey

::Hybrid Two::Binary Zoo::RGT Veteran::
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 18th Aug 2010 18:08
1. A couple of ways I can think of.
a. Create / obtain a model that already has a sword in hand.
b. Use GLUE OBJECT TO LIMB with a character model (suggested, as you could use different weapons).
2. Use a 3D modeling/animation program.
3. More than one way is possible:
a. Use the native DBP collision commands.
b. Use Sparky's collision (recommended).
c. Use Vector3 checks.

Quote: "Also, I am confused about something. It seems that all I am doing is moving around the camera, not a player."


You are; a player character would have to be loaded into the game and the camera adjusted to give proper perspective.

Quote: "Is this the right way to do things?"


You can do it whichever way you decide upon. You could make a model of two arms and attach weapons to one of them and make it into a FPS, or you could use a character and move the camera back a little bit to have a game with 3rd person perspective.

So many games to code.......so little time.

Login to post a reply

Server time is: 2024-09-28 20:20:12
Your offset time is: 2024-09-28 20:20:12