| Author |
Topic: Help with multiple vehicles |
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
Category: CoD2 MP Mapping Posted: Monday, Mar. 12, 2007 08:07 am |
 |
Hey guys,
I am having some trouble with the two tanks in my map.
the sequence is that the sherman rolls down the road then the tiger drives out in front of it and blows the sherman to smitherines.
I get an error like this..
Code: undefined is not an entity:
tiger1 attachPath(path);
Here is my GSC
Code: main()
{
//*** Init Map
maps\_sherman::main("xmodel/vehicle_american_sherman");
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");
maps\_load::main();
thread tank_a();
thread tank_b();
}
tank_a()
{
maps\_vehicle::scripted_spawn(1); // Spawns vehiclegroup 1
sherman1 = getent("sherman1", "script_noteworthy");
path = getvehiclenode ("vehicle_start_path", "script_noteworthy");
sherman1 attachPath(path);
wait 2; // so player can realise what is happening:-)
sherman1 startPath();
}
tank_b()
{
tiger1 = getent("tiger1", "script_noteworthy");
path = getvehiclenode ("tiger1_start_path", "script_noteworthy");
tiger1 attachPath(path);
wait 2; // so player can realise what is happening:-)
tiger1 startPath();
level.vehicle setTurretTargetEnt( getent ("sherman1","script_noteworthy"), ( 0, 0, 64 ) );
level.vehicle waittill( "turret_on_vistarget" );
wait 2;
level.vehicle FireTurret(); // bye bye sherman
}
Also how do you trigger vehicles?
|
 |
|
|
|
|
|
| srkovni |
General Member Since: Aug 30, 2006 Posts: 44 Last: Oct 27, 2007 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Monday, Mar. 12, 2007 06:21 pm |
 |
afflicted, but being French, I maitrise not well your language.
I believe to understand that your problem would be related to explode a tank of sherman.
if it is that, I give you a code which makes it possible to explode a truck while drawing on its tank. I think that the principle must be the same one.
Code: main()
{
camion();
}
camion()
{
level._effect["cambang"] = loadfx("fx/explosions/large_vehicle_explosion.efx");
level._effect["camfeu"] = loadfx ("fx/fire/building_fire_large.efx");
camions = getentarray("camion", "targetname");
if(isdefined(camions))
{
for(i=0; i<camions.size; i++)
{
camions[i] thread declenche();
}
}
}
declenche()
{
trig = getent(self.target, "targetname");
trig thread boumcam(self);
}
boumcam(camion)
{
camstroy = getent(self.target,"targetname");
camstroy hide();
while(1)
{
self waittill ("trigger");
{
bouchon= getent("bouchone","targetname");
reservoir= getent("reservoire","targetname");
origin = camion getorigin ();
playfx(level._effect["cambang"], origin);
playfx(level._effect["camfeu"], origin);
camion playsound("explovehicul");
camion delete();
radiusDamage(origin, 300, 200, 40);
wait(0.1);
radiusDamage(origin + (0, 0, 20), 300, 200, 40);
wait(0.1);
camstroy show();
bouchon delete();
reservoir delete();
break;
}
}
}
Translate targetname in english
truck = camion
stopper= bouchon
tank = reservoir
if you manage to make move vehicles, I will be to interest. could you put on line your 2 gsc
maps\_sherman::main("xmodel/vehicle_american_sherman");
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");
|
 |
|
|
|
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
Category: CoD2 MP Mapping Posted: Monday, Mar. 12, 2007 10:06 pm |
 |
thnx for your help,
I have been reading through the newvillers GSC and i found this..
Code:
node = getvehiclenode("townhall_tigersurprise", "script_noteworthy");
node waittill ("trigger");
Does this have any significance i also saw it in this thread
|
 |
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
|
| JerryTube |
 |
General Member Since: Mar 4, 2007 Posts: 88 Last: Jul 1, 2013 [view latest posts] |
|
|
 |
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|