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 / Can anyone let me know if this is possible in DBPRO?

Author
Message
Nuke
5
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 3rd Feb 2014 23:30
I bought DBPro and am making my first game - exciting.

However, I was wondering if there were scripts/specific characters that will only be hostile towards the character if the player attacks it first. For example, it would just stand around, but if the player attacks/shoots it or w/e, it will become hostile. Thanks!

sup
Derek Darkly
7
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Feb 2014 14:15 Edited at: 4th Feb 2014 14:16
Quote: "For example, it would just stand around, but if the player attacks/shoots it or w/e, it will become hostile."


Keep in mind that all functions/scripts/etc. in programming are 100% "made up" by someone and you can make stuff up too.

You could make a variable called EnemyState for example, and so while EnemyState=0 the the enemy is calm, but if attacked the enemy goes into attack mode so you could then say EnemyState=1 for attacking. If the enemy is killed, you could say that EnemyState=2 means the enemy is dead and motionless.

As for making the character actually do the things that the variables call for, you will need to come up with your own AI system or get a plugin.

Phaelax
DBPro Master
16
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Feb 2014 15:56
Of course it's possible. But it's entirely up to you to program it.

BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Feb 2014 18:54
Nuke, we really need to know what stage you are at with your development in order to help. You could get some very confusing and meaningless answers otherwise.

mr Handy
11
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 7th Feb 2014 16:18
Brief plan:
1. You make a function to make NPS with certain number move to target and attack.
2. You make a check in player attack function if the NPS is friendly; and if yes then change it's state to hostile.
3. You should make an array to store all NPS's states (NPS position, life, hostile or not, target coordinates, etc).

All your TGC are belong to us.

Login to post a reply

Server time is: 2019-04-21 18:20:44
Your offset time is: 2019-04-21 18:20:44