2 Scripts-Need Merging!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

2 Scripts-Need Merging!

Post by BiG_HeaD »

I have a Jeep Script and a Truck Script that i need to both work on the same map.

Heres Truck:
main:
exec global/loadout.scr maps/test_lkwfahrt.scr
exec global/ai.scr

level waittill prespawn

level.script = maps/test_lkwfahrt.scr
exec global/ambient.scr obj_team3

level waittill spawn

$player stufftext "tmstartloop sound/music/mus_15a_mystery.mp3"

//$faketruck_model notsolid
$faketruck_collision notsolid
$faketruck_model anim idlelights

$faketruck_collision bind $faketruck_model // Bind the getawaytruck bed collision to the fake truck
$faketruck_playerspot bind $faketruck_model

$fluchtlkw_fahrer exec global/disable_ai.scr // Disable getaway driver AI
$fluchtlkw_fahrer notsolid // Make getaway driver nonsolid
$fluchtlkw_fahrer rendereffects "-shadow" // No shadow
$fluchtlkw_fahrer anim_scripted opel_driver // Play driver animation
$fluchtlkw_fahrer bind $faketruck_model
$fluchtlkw_fahrer show
end

obj7_complete:

thread intro_truck

end

intro_truck:

//*** temporarily set the disguise so the AI won't shoot at him
$player.has_disguise = 1

//*** put the player into the truck
$player glue $faketruck_playerspot 0
$player physics_off

//*** jitter routine for the player
level.intruck = 1
thread intro_truck_jitter

//*** lock the players view
//level.lockview = 1
//thread intro_truck_lockview

//*** play the sound for the ride
$faketruck_model playsound m4l3_truck1

//*** fade the view in
//fadein 2 0 0 0 1

//*** get the truck moving on its path
$faketruck_model followpath $faketruck_entrypath
$faketruck_model waitmove

// lkw f?hrt r?ckw?rts in die einfahrt
$faketruck_model followpath $faketruck_entrypath2
$faketruck_model waitmove

//*** play the sound for idling
$faketruck_model loopsound m4l2_truckidle

//*** re-activate the player and give him his weapons back
$faketruck_collision solid
$player physics_on
$player unglue

level.intruck = 0

thread player_prep

//*** autosave the game
//exec global/autosave.scr 1

wait .5
$faketruck_model stoploopsound

$player playsound dfr_m4l3_add06 //go, now, quickly

end

//*********************************************
// prep the player
//*********************************************
player_prep:

$player item weapons/silencedpistol.tik

$player item weapons/shotgun.tik

$player item weapons/KAR98sniper.tik
$player item weapons/mp40.tik

$player item weapons/steilhandgranate.tik

$player ammo pistol 80
$player ammo rifle 200
$player ammo smg 200

$player ammo grenade 6
$player ammo shotgun 92
$player ammo heavy 92

$player useweaponclass heavy

$player.has_disguise = 0

iprintlnbold "Bitte aussteigen!"

end

//*************************************************************
// lock the players view once beyond the gate
intro_truck_lockview:

$player.viewangles = (0 90 0)

while (level.lockview == 1)
{
if ($player.viewangles[1] < 20)
{
local.x_angles = $player.viewangles[0]
local.y_angles = 20
local.z_angles = $player.viewangles[2]
$player.viewangles = (local.x_angles local.y_angles local.z_angles)
}
else if ($player.viewangles[1] > 160)
{
local.x_angles = $player.viewangles[0]
local.y_angles = 160
local.z_angles = $player.viewangles[2]
$player.viewangles = (local.x_angles local.y_angles local.z_angles)
}

waitframe
}
end

//*************************************************************
// shaking the players view while riding the truck
intro_truck_jitter:

while (level.intruck == 1)
{
if (level.intruck == 1)
{
waitexec global/earthquake.scr .3 .1 0 0
}

if (level.intruck == 1)
{
waitexec global/earthquake.scr 3 .05 0 0
}

if (level.intruck == 1)
{
waitexec global/earthquake.scr .5 .15 0 0
}

if (level.intruck == 1)
{
waitexec global/earthquake.scr 1.5 .05 0 0
}

if (level.intruck == 1)
{
waitexec global/earthquake.scr .2 .2 0 0
}

if (level.intruck == 1)
{
waitexec global/earthquake.scr 3 .05 0 0
}
}
end


Heres Jeep:

main:
exec global/loadout.scr maps/test_jeepfahrt.scr

level waittill prespawn

level.script = maps/test_jeepfahrt.scr
exec global/ambient.scr obj_team3

level.slowspeed = 200 //was 200
level.fastspeed = 400 //was 400
level.reversespeed = -120 //was -150
level.lookahead = 256

level.playerjeep = $playerjeep
level.playerjeep thread global/vehicles_thinkers.scr::PLAYER_JEEP_CONTROLLER $s1_trigger1

level waittill spawn

level.playerjeep thread PLAYER_JEEP_Drive

end

PLAYER_JEEP_Drive local.trigger:

self drive $jeeppath1 level.slowspeed 80 200 level.lookahead

self waitTill drive
self stop

wait 4

// fahrt nach hinten

self drive $jeeppath2 level.reversespeed 50 200 level.lookahead
wait 1
self waitTill drive
self stop

end


:oops:
Ive played more than u.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

well, copy and paste the jeep on into the truck one and save it as yourmapname.scr. be sure in ure map u have a jeep and a truck with those target names and all that other good stuff.
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

where?!?!
Ive played more than u.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

what do u mean where? u copy the first script u have up, paste it into the second script u put up, save it as yourmapname.scr.
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

post it. didnt work for me
Ive played more than u.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

as long as the threads don't have the same name you can put them all into the same script, don't have two "main" threads though, just place everything from the 2nd main thread into a 1st at the top of the script,
hope this helps, prob not cos it's all foreign 2 me :-/
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

not sure i know what you mean.

Tried doing that, you think you could help me out and

post it?
Last edited by BiG_HeaD on Fri Dec 26, 2003 3:29 am, edited 1 time in total.
Ive played more than u.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

BiG_HeaD wrote:post it
no please, thanks, kiss my ass or anything...

you can't even copy and paste needed items from one word document to another, i'd give up on scripting if i were you

you call yourself BIG HEAD??? you should get a new sign in as COCK HEAD!!!
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply