Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: [Tutorial] Riding into battle on a tank
P.o.W
General Member
Since: Sep 11, 2004
Posts: 123
Last: Mar 17, 2020
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, May. 2, 2006 02:46 pm
ok so 1st thing is to get the tank working byitself, then we will work on the player etc.

Ok so make usrelf a script vehicle and then a enter a key of model and value of xmodel/vehicle_crusader2 as thats the one that has bones alowing you to do this. And here is the key's and values

KEYS:: VALUES::
script_avoidvehicles 1
script_turret 0
script_vehiclestartmove 1
vehicletype crusader
targetname tank

Obv the top 3 are your prefrence and so is targetname

Create a vehiclenode and tick start node, also put speed at the key and about 6 as the value. Place the node were u want the vehicle to start.
Now make another vehiclenode dont tick the start node but put the speed in all the same, you can copy that 1 as many times as you like for your path but only have 1!!!! start node, well you can have 2 but shhhh :P . Now connect the tank ("W") to the start node and then the start node to the next node and soooooo on till you have reached the end. Make a player start next to the tank and compile.

Now for the script, were all the buisness is done.


ok so you script will start like this.

Code:
<br />
<br />
#include maps\_utility;<br />
#include maps\_anim;<br />
<br />
main()<br />
{<br />
<br />
	maps\_crusader::main("xmodel/vehicle_crusader2");<br />
<br />
	maps\_tankai::main();<br />
	maps\_tankai_crusader::main("xmodel/vehicle_crusader2");<br />
	maps\_load::main();<br />
<br />
	thread tanks_setup();<br />
	thread playertank();<br />
}<br />
<br />
tanks_setup()<br />
{	<br />
	thread Intro_Tanks_Setup("tank");<br />
<br />
	tanksSetup = 0;<br />
	while (tanksSetup < 3)<br />
	{<br />
		level waittill ("tank setup");<br />
		tanksSetup++;<br />
	}<br />
<br />
	tank = undefined;<br />
	tank = getent("tank", "targetname");	<br />
	while(!isdefined(tank))<br />
	{<br />
		wait .05;<br />
		tank = getent("tank", "targetname");<br />
		<br />
	}<br />
}<br />
<br />
<br />
Intro_Tanks_Setup(targetname)<br />
{<br />
	tank = getent("tank", "targetname");<br />
<br />
	if (targetname == "tank")<br />
	{<br />
level.tank = maps\_vehicle::waittill_vehiclespawn("tank");<br />
		tank.allowUnloadIfAttacked = true;<br />
		tank.health = 100;<br />
	}<br />
	level notify ("tank setup");<br />
}<br />
<br />
playertank()<br />
{<br />
	tank = getent("tank", "targetname");<br />
	tank thread maps\_tankgun::mgoff();<br />
<br />
<br />
	path = getVehicleNode (tank.target,"targetname");<br />
	tank attachpath(path);<br />
	tank startPath();<br />
<br />
	level.player.angles = (0,-45,0);<br />
	level.player setorigin (leadtank getTagOrigin ("tag_playerride"));<br />
	level.player playerLinkToDelta (tank, "tag_playerride", 0.85);<br />
<br />
	level.player allowLeanLeft(false);<br />
	level.player allowLeanRight(false);<br />
	level.player allowProne(false);<br />
	level.player allowCrouch(false);<br />
	level.player setplayerangles ( tank gettagAngles ("tag_playerride") );<br />
<br />
	tank waittill ("reached_end_node");<br />
<br />
	thread tank_getoff();<br />
}<br />
<br />
<br />
<br />
<br />
tank_getoff()<br />
{<br />
tank = getent ("tank","targetname");<br />
	dummy = spawn("script_origin", tank getTagOrigin("tag_playerride") );<br />
	dummy.angles = tank getTagAngles("tag_playerride");<br />
	<br />
	level.player unlink();<br />
	level.player linkto (dummy);<br />
	<br />
	endPos = (-569, -211, 32);<br />
	<br />
	dummy moveTo(dummy.origin + (0,0,10), .6, .3, .2);<br />
	wait .6;<br />
	dummy moveTo(endPos, .6, .3, .2);<br />
	wait .5;<br />
	<br />
	level.player unlink();<br />
<br />
	level.player allowLeanLeft(true);<br />
	level.player allowLeanRight(true);<br />
	level.player allowProne(true);<br />
	level.player allowCrouch(true);<br />
}<br />
<br />


OK now in tht last thread were it says endPos = (- bladabladabla, u must put map specific 1s in there, its just were you want to end when u get off the tank.

This is my basic script from my tank test map so when you put in your map script, be carefull with the arrangement. Set the arragements of your globa scripts up cuase belive it or not they can stop everything from working :(

As i say its basic and mine is alot more compilcated, as i have bits tht apply to my map like tanks getting bombed and blowing up and therefore creating fire efx and stuff which is not hard tbh but mine is all in a different script so i didnt want to confuse things.

Here it is, i you know how to use it and were to put it go for it.

Code:
<br />
earthquake(1.0, 1.0, leadtank.origin, 6000); // scale duration source radius	<br />
	<br />
	tank dodamage ( tank.health + 200, (0,0,0) );<br />
	tank notify ("death");<br />
	TankFireSound = spawn("script_origin",leadtank.origin);<br />
	TankFireSound playloopsound ("medfire");<br />


There is many many more things you can do with this so just experiment and try whatever comes to mind really.

OH nearly 4got, want sounds? Make a csv (plenty of tuts on this on the web so dont ask me to write it again) and put this in.

#Vehciles
crusader_idle_low,,vehicles/mrk_tank_03_idle.wav,0,,vehicle,0.75,,7,2500,auto,,,looping,,ENTERYOURMAPHERE,,,,weapon2,,,,
crusader_idle_high,,vehicles/mrk_tank_03_idle.wav,0.3,,vehicle,1,,7,2500,auto,,,looping,,ENTERYOURMAPHERE,,,,weapon2,,,,
crusader_engine_low,,vehicles/mrk_tank_03_move.wav,0,,vehicle,0.75,,7,4000,auto,,,looping,,ENTERYOURMAPHERE,,,,weapon2,,,,
crusader_engine_high,,vehicles/mrk_tank_03_move.wav,0.68,,vehicle,1,,7,4000,auto,,,looping,,ENTERYOURMAPHERE,,,,weapon2,,,,
crusader_fire,1,weapons/flak/flak88_fire02.wav,1,1,vehicle,1,1.2,1000,8500,auto,,,,0.85,ENTERYOURMAPHERE,,,,weapon2,,,,0.3
crusader_fire,2,weapons/flak/flak88_fire03.wav,1,1,vehicle,1,1.2,1000,8500,auto,,,,0.85,ENTERYOURMAPHERE,,,,weapon2,,,,0.3
crusader_turret_spin,,vehicles/mrk_turret_turn04_22k.wav,0.85,0.85,vehicle,1,,7,3500,auto,,,looping,,ENTERYOURMAPHERE,,,,weapon2,,,,
crusader_turret_stop,,vehicles/mrk_turret_end01_22k.wav,0.1,0.1,vehicle,0.9,,7,3500,auto,,,,,ENTERYOURMAPHERE,,,,weapon2,,,,

Were it says ENTERYOURMAPHERE put your map name.

Annnnnnnnnd think thats all folks, gimme a shout on the blower if it dont work and il update it. Took more time to pull it out of my script and place it together than it did to make the bloody thing.

PS:: This is my way of doing it, there are others
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Wednesday, May. 3, 2006 03:41 am
added to the tutorials section

[angryalien]
Share |
leethebrave
General Member
Since: Apr 24, 2006
Posts: 52
Last: Oct 2, 2006
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Wednesday, May. 3, 2006 09:48 am
Isnt this useless at the moment since we only have 16k state going, we need 128k for vehicles dont we?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 MP Mapping
Posted: Wednesday, May. 3, 2006 10:23 am
Nice one but you forgot one very important thing to mention right at the top.......

This tutorial is for Single Player Only!


New mappers might not realise this.

Grassy
Share |
leethebrave
General Member
Since: Apr 24, 2006
Posts: 52
Last: Oct 2, 2006
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Wednesday, May. 3, 2006 10:27 am
Ah ignore my post then
Share |
soulwax
General Member
Since: Nov 14, 2005
Posts: 255
Last: Jul 28, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Sunday, Oct. 22, 2006 05:27 pm
about that sound what is the sound file of a tiger
because it looks kinda dumb to have a tiger with crusader sounds

Where can i find them or you allready know them
Share |
Nemo06c
General Member
Since: Jul 23, 2006
Posts: 303
Last: Feb 9, 2010
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Sunday, Oct. 22, 2006 06:39 pm
iw_06.iwd/sound/vehicules/*.wav
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»