Page 1 of 1

Stalingrad spawn the dog

Posted: Mon Apr 12, 2004 12:04 am
by drdeath
ok my 1st post ..............

i want to make a dog spawn in the courtyard and then either an allie or axis grab the dog and keep it away from the opposition for as long as poss then they get pionts for however long they keep it away from them for and when thay get killed the dog respawns back in the courtyard

has anyone any ideas on how this is possible ??

thanks for your time 8-)

Posted: Mon Apr 12, 2004 1:26 am
by lizardkid
well, in your script you can add this line to the thread you want to call at the start....

spawn models/animal/german_dog-real.tik

that spawns the dog, you'll need to get an origin for it, which is where it starts, so in your map go to the place where you want to have the dog start and open the console and type in coord, hit enter and copy down the coordinates and place this line right after the .tik part of the spawn.

"origin" "x y z"

for x place the x coordinates, y put the y coordinates, and z for the z coordinates.
in other words, put the coordiantes you got from coord in where the x y z is.

by the way, welcom to .map m8!!!!! :wink: 8-) :D

Posted: Mon Apr 12, 2004 1:34 am
by blue60007
Well you could bind a trigger_use to it and as long as the person is hitting use, you'd be holding it.

Posted: Mon Apr 12, 2004 1:41 am
by lizardkid
i had an idea for points too......

put this in your script:

Code: Select all

dogscript:

level.alliepoints = 0 //put this before the level waittil prespawn
level.axispoints = 0 //put this before the level waittil prespawn 
level.dogheld = 0

if (dogheld = 0)
{
goto finish
}
if (dogheld = 1)
{
level.alliepoints ++
goto finish
}
if (dogheld = 2)
{
level.axispoints ++
goto finish
}

finish:

end
call this from a trigger that spans the entire map and dont put a cnt value to it. that way it'll keep getting called. :wink:

Posted: Mon Apr 12, 2004 2:46 am
by drdeath
thanks for that but with me being a bit of a n00b when it comes to scripting (lol) dont get me wrong i want to learn but need some help if anyone is willing to show me the way :oops:

Posted: Mon Apr 12, 2004 9:13 am
by bdbodger
When you say
then either an allie or axis grab the dog
do you mean that you want the dog to follow the allies or axis player ?
That is not possible unless you make a custom dog . If you do what to have a custom dog that can follow I can help you with makeing the dog you still need a map that has pathnodes in it for the dog to move . There is a way to make a .pth file if the map is not one you made and has no pathnodes in it .

Posted: Mon Apr 12, 2004 12:39 pm
by Cobra {sfx}
No he means just using a "still" dog, and each team has to keep it as long as possible to win on a points system, so were talking pressing e and the dog sticks to you unless you are killed and someone else takes the dog.

I can help him but not on my own, most of my scripting is thru cut n paste and trial and error.

I know theres a capture the flag for stalingrad perhaps that can be modified to use the dog instead of a flag?

Ideas anyone?

Cobra

Posted: Mon Apr 12, 2004 2:41 pm
by lizardkid
oops, sorry, i forgot you're newish. :oops: :oops:

ok, anytime you see a "level." (without quotes) it's a variable, which is something that holds information, numbers, letters, etc.
the spawn command is pretty self-explanitory, it creates an entity. which is anything that can be manipulated in any way.

with the spawn command i just used this, which is the basic script spawn.

spawn models/animal/german_dog-real.tik

the bolded part is the command, the rest is telling it exactly what things to do for it. the italicized parts are the path for the german dog, which means like,

C:/Program files/EA/MOHAA

is probably your directory for your game,

animal/german_dog-real

is the subdirectory for the dog model. .tik is the format, tiki, which is proffesional grade models.


as for the dogheld stuff in dogscript, it wasn't completely finished i suppose. but im not too great on mp. what i did was use the if statement to ask the computer about something. i asked it about the level.dogheld variable. i made it so that if the variable was 0, no one had the dog. if it were 1, allies had it, and if it were 2, axis had it. i forgot to add the part where it determines which side has it. which would require experimentation on my part, which it's almost 10:00 my time so i cant really do that.

come to think of it, since your dog is not going to attack someone you'll need this line added to spawn.

"sight" "0" "hearing" "0"

and afterwards in the line one down from it insert

$dog nodamage

sorry if i confused you m8, :wink:

anyway, i suppose a tut could explain all this better than i could so check out the MOHAA scripting language tuts, there's three of them. go to all of them tut option and look for about threee or 4 reference tuts in a row.

Posted: Mon Apr 12, 2004 6:12 pm
by drdeath
it does not have to be a dog it could be a toilet,crate ect

Posted: Mon Apr 12, 2004 9:32 pm
by lizardkid
yeah, so you can exempt the whole spawn thing and just put in your toilet crate, whatever. but you'll probably still need the big hunk of axis/allies/no one code there.

if im confusing you a whole bunch i ought to stop writing. :) :wink: