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.

Author
Message
Baconhead
17
Years of Service
User Offline
Joined: 22nd Nov 2008
Location:
Posted: 14th Oct 2010 03:28
Im new to dbpro and i have this project called Carbonade...soda runs around collecting fruit for energy. I've checked the forums for help but found nothing. In the game giant chocolate bars attack you...but Im not sure how to make the choco bar attack the player
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 14th Oct 2010 05:25
Well the simplest way is just to rotate the object/sprite towards your player and move it forward.

My computer surpasses all the technologies of the day. What computer do I have?

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 14th Oct 2010 08:39
Prepare actions for the enemies for what they should do in different cases.

1. walk around when player is out of sight
2. attack when within a certain distance
3. chase for a while if player flees away

I absolutely have no idea how a chocolate bar would attack a soda, that's up to your imagination
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Oct 2010 17:52
Quote: "I absolutely have no idea how a chocolate bar would attack a soda, that's up to your imagination"


I'm thinking huge chocolate bars that grab the soda-player and pour out their soda... if all if it pours out their dead.

Baconhead
17
Years of Service
User Offline
Joined: 22nd Nov 2008
Location:
Posted: 14th Oct 2010 19:02 Edited at: 14th Oct 2010 19:29
So would i use the Yrotate object and move object command to have the bar face the enemy?

Also what commands do i use so that it follows/attacks the player?
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 14th Oct 2010 19:23
Oh so we are in 3d... well yeah that's a nice basic method, though used a little more cleaverly. You should store the X and Z axis in variables, then use POINT OBJECT to face the player, and then restore the X & Z rotations so only the Y is really affected. Though of course you don't need this in the case of a flying type enemy.

If you are close enough, they start rushing at you, if you get out of their sight, they are back to their idle behavior.
Baconhead
17
Years of Service
User Offline
Joined: 22nd Nov 2008
Location:
Posted: 15th Oct 2010 06:14
Is there like a followplr command like in fpi?
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 15th Oct 2010 06:33 Edited at: 15th Oct 2010 06:33
what's FPI?

I think you should go over some tutorials first...

Check out this thread:
http://forum.thegamecreators.com/?m=forum_view&t=115633&b=7

This tutorial by Zotoaster:
http://forum.thegamecreators.com/?m=forum_view&t=63411&b=7
really really helped out my understanding of arrays and types.
[edit]
(its a basic AI tutorial)

gbark
20
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 15th Oct 2010 06:44 Edited at: 15th Oct 2010 06:44
Quote: "Is there like a followplr command like in fpi?"


No. DBPro is a programming language designed for games, but it's not a "game generator" tool. As far as DBPro is concerned, it has no idea what the player object is, how an enemy should move, or what an attack is - These are things that you have to program yourself.

For example, you'll need to use the math commands so that you can determine what the angle is between an enemy and the player, you'll need to move the enemy object towards the player if the player is in sight, and program your own "attack" in once the player is in range.

What should an attack do? Well, it will probably kill the player or take away some of his health, depending on how you want your game to be. Again, these are things you'll have to program yourself, there are no built in functions for things like this.
Baconhead
17
Years of Service
User Offline
Joined: 22nd Nov 2008
Location:
Posted: 15th Oct 2010 18:44
thx

Login to post a reply

Server time is: 2026-07-22 12:41:49
Your offset time is: 2026-07-22 12:41:49