dog follow player

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Phil {sfx}
Sergeant
Posts: 67
Joined: Thu Sep 30, 2004 2:08 pm
Location: uk
Contact:

dog follow player

Post by Phil {sfx} »

Anyone know what the code is to make a dog follow a player?

I have tried various things like tether but had no joy.

I know theres a topic on this on .map but when i click the link for topic 444, i just get a error.
Senior Modder/Mapper/Scripter/Modeller @ www.mods-r-us.net
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Sure you create a custom dog and make a custom new_generic_dog.tik then he will follow you like the dogs in my rescue map if you script it right .

The_rescue.pk3
Image
Phil {sfx}
Sergeant
Posts: 67
Joined: Thu Sep 30, 2004 2:08 pm
Location: uk
Contact:

Post by Phil {sfx} »

Cheers bd,

i'll give that a try. :)
Senior Modder/Mapper/Scripter/Modeller @ www.mods-r-us.net
Phil {sfx}
Sergeant
Posts: 67
Joined: Thu Sep 30, 2004 2:08 pm
Location: uk
Contact:

Post by Phil {sfx} »

That works a treat bd, thanks alot. :)

One more :?: ,

To do this you need nodes, is there anyway to make it follow you without using nodes? Like when its state is attack it moves without nodes.

The "runto" cmd needs nodes, is there any other cmd that doesnt?, tried a few and but had no affect.

cheers.
Senior Modder/Mapper/Scripter/Modeller @ www.mods-r-us.net
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Any time you have ai you should have pathnodes . If you want the dogs to follow you definately need pathnodes .
Image
Phil {sfx}
Sergeant
Posts: 67
Joined: Thu Sep 30, 2004 2:08 pm
Location: uk
Contact:

Post by Phil {sfx} »

Thanks,

I thought you might have been able to turn the player linked to the dog into its enemy so it ran close using the attack state but then have some code reset its enemy when its vector is close.

If you know this isnt possible please tell me or i'll have a bash at a few different ways later.
Senior Modder/Mapper/Scripter/Modeller @ www.mods-r-us.net
Gooser13
Private
Posts: 4
Joined: Tue Mar 08, 2005 8:24 pm
Location: Edmonton, Alberta, Canada

Post by Gooser13 »

Is this server side?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

no not when you use a custom new_generic_dog.tik it requires a custom dog to be created .
Image
Gooser13
Private
Posts: 4
Joined: Tue Mar 08, 2005 8:24 pm
Location: Edmonton, Alberta, Canada

Post by Gooser13 »

Could you just add the animations to the german_shepard.tik?

Code: Select all

	unarmed_run_forward			dog_run.skc	
	{
		client
		{
			0	sound	dog_fs
			2	sound	dog_fs
			7	sound	dog_fs
			8	sound	dog_fs
		}
	}
								
	unarmed_run_left			dog_run.skc
	{
		client
		{
			0	sound	dog_fs
			2	sound	dog_fs
			7	sound	dog_fs
			8	sound	dog_fs
		}
	}
									
	unarmed_run_right			dog_run.skc	
	{
		client
		{
			0	sound	dog_fs
			2	sound	dog_fs
			7	sound	dog_fs
			8	sound	dog_fs
		}
	}
								
	unarmed_run_back			dog_run.skc
	{
		client
		{
			0	sound	dog_fs
			2	sound	dog_fs
			7	sound	dog_fs
			8	sound	dog_fs
		}
	}
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

This would require a download anyway.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply