Disable truck
Moderator: Moderators
Disable truck
I got a problem with the script to disable trucks. I found the whole script (it's, I think 1?2b). I found the disabling truck part but I don't know what parts I have to take over for my script and what I don't need...
Please, can anybody help me with this?
(Btw, to disable a truck, is this just scripting, or is there a special model with the open motor?)
Thanks in advance!
Please, can anybody help me with this?
(Btw, to disable a truck, is this just scripting, or is there a special model with the open motor?)
Thanks in advance!
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
i think she wants to make her own version 
make two trucks, should be two separate models something like opeltruck_open_damaged.tik and give them separate targetnames. put a trigger_use around the open part of the engine of the intact one, give it a setthread of clipWire, and a cnt of 1. in your script...
it's pretty self-explanitory with the names 
make two trucks, should be two separate models something like opeltruck_open_damaged.tik and give them separate targetnames. put a trigger_use around the open part of the engine of the intact one, give it a setthread of clipWire, and a cnt of 1. in your script...
Code: Select all
level waittill spawn
thread prepTruck
end
prepTruck:
$truck_dmg hide
$truck_dmg notsolid
end
clipWire:
$truck_intact remove
$truck_dmg show
$truck_dmg solid
iprintlnbold "You've disabled the truck!"
endModerator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
You need the model of an Opel with the engine open, 2 script_objects and a trigger_use. The 1st script_object will be the normal wire, the 2nd one will be the cut one. Place the trigger_use over the engine and give it the key/value entry:
setthread / wire_cut
Have this code:
And this at the end:
setthread / wire_cut
Have this code:
Code: Select all
// put this at the beginning of the script
$cut_wire hide // hides the cut wireCode: Select all
wire_cut:
local.player = parm.other // parm.other is the player who activated the trigger
// cansee <target> <FOV> <distance>
if (local.player cansee $normal_wire 30 64) // if the player can see the normal wire
{
self nottriggerable // turn off the trigger (cannot trigger it anymore)
$cut_wire show // show the hidden cut wire
$normal_wire delete // delete the normal wire
}
endThe darn truck doesn't really work...
Here's the script:
Do I actually have to draw the wire? And what about the normal_wire? It's in the script, but I don't think it's in the map...
And, would you please, please be so kind to check this one out:
Here's the script:
I don't know, did I miss anything? Or does the script just suck?!
main:
exec global/ai.scr
//////////
level waittill prespawn
$enemyspawn ai_on
/////////
level waittill spawn
// player weapons
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player item weapons/mp40.tik
// give him some ammo!
$player ammo pistol 32
$player ammo smg 100
$player ammo rifle 60
// disable truck
$cut_wire hide
thread global/ai.scr::spawngroup #1 #1
//disable truck
wire_cut:
local.player=parm.other // parm.other is player whi activated the trigger
// cansee <target> <FOV> <distance>
if (local.player cansee $normal_wire 30 64) // if the player sees normal wire
{
self nottriggerable // can't trigger it anymore
$cut_wire show // show hidden cut wire
$normal_wire delete
}
end
end
Do I actually have to draw the wire? And what about the normal_wire? It's in the script, but I don't think it's in the map...
And, would you please, please be so kind to check this one out:
That's the script of 1?2b - or the parts which seemed to me to have someting to do with the truck...level waittill spawn
level.script = "maps/m1l2b.scr" // Initialize variables
level.disabledtrucks = 0
level.opentruck01_disabled = 0
level.opentruck02_disabled = 0
level.opentruck03_disabled = 0
level.bombedtanks = 0
level.tank01_bombplanted = 0
level.tank02_bombplanted = 0
level.tank03_bombplanted = 0
level.tank04_bombplanted = 0
level.munitionscache_bombplanted = 0
level.bombsleft = 5
level.scoldsmoker = 0
$cutwire01 hide // Initialize entities
$cutwire02 hide
$cutwire03 hide
$crate1_end hide
$crate2_end hide
$crate3_end hide
$bomb02 hide //TEMP
$door01 lock
$door02 lock
$radio1 loopsound m1l2b_radio1 // Looping radio sounds
$radio2 loopsound m1l2b_radio2
bla
//******************************************************//
// MAIN PROGRAM //
//******************************************************//
bla
//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
$wire01 remove
$opentruck01 playsound m1l2b_disabletruck
$cutwire01 show
level.opentruck01_disabled = 1
thread nexttruck
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
H??
What's that s'posed to mean, Rookie One?
What's the problem with my truck then? Sorry, but I really don't understand what I actually have to change to make it work...
The truck's there in the game but there are NO bloody wires...
Edit: Do I have to make two brushes with texture script_objects where the wire should be?
What's that s'posed to mean, Rookie One?
What's the problem with my truck then? Sorry, but I really don't understand what I actually have to change to make it work...
The truck's there in the game but there are NO bloody wires...
Edit: Do I have to make two brushes with texture script_objects where the wire should be?
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
ok the two script objects are flat brushes set across the engine, one with an intact pulsing wire texture, the other the broken wire texture. If you cant find them you can make new ones to jazz up your map.
once the trigger is used then you "clip" the wires by removing the whole one and showing the broken one.
once the trigger is used then you "clip" the wires by removing the whole one and showing the broken one.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Here you go. A prefab and a piece of script included.
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:



