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 / How can you get other characters to follow you?

Author
Message
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 00:06
Can someone give me a sample code, or please tell me and help me get other characters in the game to kill the enemies but to follow you around and not kill you.. ?

Because in my new game I'm going to make ASAP, it is teh Iraqi's vs. the Americans in a war simulation.. But I need other American soldiers to help you out in the game. So does anyone know of a way to achieve this goal in the game? thanks!
AlamDV, NHL, NHL 2K3....... The best combination ever!
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 00:09
Oh and no offense to anyone living in the Middle Eastern area

AlamDV, NHL, NHL 2K3....... The best combination ever!
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 4th Feb 2003 00:37
you are object 1
they are object 2
your (player 1's) positions are x1#,y1#,z1#

QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 4th Feb 2003 00:37
whoopsie

Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 00:45
Ok, that helps with getting them to follow the player.. But how do you get them to shoot the enemies and not shoot you and the other American soldiers?

AlamDV, NHL, NHL 2K3....... The best combination ever!
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 4th Feb 2003 02:43
Well, fortunately for you, that's something that can be done much more easily in code than it can be done in real life.

I'd personally define two states for each of your bullet-stoppers: a 'follow' state and a 'fight' state. They would decide which state to be in based on whether or not they can see any enemies and how far away they are from the player. If they are either a long way off from the player (unless you told them to hold position) or there are no enemies in their line of sight, they will adopt the 'follow' state and run through Raven's coding by means of an if statement.

If there is an enemy in their field of view and they're in a good mood to attack it, they would switch to the 'fight' state. This would cause them to bypass the AI to follow the player and instead let loose hell on whatever poor sap is in front of them by following some other code that causes them to shoot.

Of course, there are lots of subtle AI refinements that you can add to make them seem more life-like:

Instead of have a fixed 'distance from player' to cause them to follow you again, you could make them also assess how far away from their opponent they are and how much help you need from them. If you're not in any danger and they've got a very good shot at an enemy, even though you might be a good few meters away from your friend, he would still attack the hostile target.

Likewise, you could implement firing restrictions - prevent the troop from firing when all he can see is somebody's little finger about three miles away or stop him from blasting away even though the rest of the team are standing in front of him.

To be really impressive, you could even make a morale system. As troops get more panicky, they tend not to follow the rules quite as much - shooting at anything that moves or ignoring nearby friends when enemies are around.

Hope this helps!

"I am a living, thinking entity who was created in the sea of information."
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 03:26
Ok, it sort of helps.. But how about a little sample code. I mean, I would have no clue how to code it so the character can be in the "fight" and "follow" thing... I mean, what would i code for those, and how would I make it so they shoot at the enemy (and can see him)

AlamDV, NHL, NHL 2K3....... The best combination ever!
Arrow
21
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 5th Feb 2003 03:00
Just an idea, you might want to change the plot to a more fictional one. Right now, war is a real possablity, and such a game at this moment in time might be flack for it. I good way to fix this is to change the army into fictional ones, maybe go as far as to make is sci-fi. However it's your choice, but I can only handle one post like "Evemination of Evil" a day.

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 5th Feb 2003 03:27
Well this game won't really say much about Iraq.. So pretend it is.. erm... Germany!!! AHHHH!! HITLER!!! lol

But, the game really is just killing soldiers. But I am using the Iraqi Soldier model from Dark Matter for those guys. . But then again I might use teh German ones or for some reason, the Soviet ones. I really need to see which ones look best for the game.. In fact, it may be like Rainbow Six.. You are two other characters are two terrorists killing other things.. Or did I get it mixed up and you are SWAT or something, killing the terrorists?? I cant remember. But it will have some things in it that are like Rainbow Six.. Like, when you die, you will take the place of one of the other characters that are your ally. Remember, there are only three other ones so you can only take the place of them 3 times.. And each time, one of the members of the army thing your in will disappear.. And that would be you, when you died... Like it?

AlamDV, NHL, NHL 2K3....... The best combination ever!
Arrow
21
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 5th Feb 2003 04:08
Can't say I've played 'Rainbow Six', but I'm glad this isn't a political thing.

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 5th Feb 2003 04:11
It aint a political thing... But you can Download the Rainbow Six demos at www.downloads.com .

Just go to the little search box at the top and type Rainbow Six and it will give you the downloads of the demos... Good game it is!

AlamDV, NHL, NHL 2K3....... The best combination ever!

Login to post a reply

Server time is: 2024-11-23 23:54:53
Your offset time is: 2024-11-23 23:54:53