Did I firewall-antispyware-and-cookie-whatever it to death???
Disable truck
Moderator: Moderators
Alright, it almost works
One more problem: my script.
I know I musta done something wrong as BOTH wires appear at the same time...
But anyway, Rookie, thank you so much for your help - you'll have my deepest gratitude (?) for the rest of your life
One more problem: my script.
What do I have to change?
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
thread global/ai.scr::spawngroup #1 #1
//put this line at the beginning of the script:
$cut_wire hide
lorry_disable:
$normal_wire delete
$lorry_engine playsound m1l2b_disabletruck
$cut_wire show
iprintlnbold_noloc "The lorry has been disabled!"
// put whatever stuff you want to be done when the lorry has been disabled here
end
But anyway, Rookie, thank you so much for your help - you'll have my deepest gratitude (?) for the rest of your life
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
HeheRookie One.pl {sfx} wrote:No problem, always willing to help, especially girls.![]()
Yeah, I saw that I have only one end... I checked with the script for the existing MOH map (how to disable a truck) and found that there should be some more of those
What does the line 'end' do anyway?
I'll change that in my sucking script and I guess it should work after that... I'll let ya know.
Thanks very much for the help again. Really, without all the help from you nice guys I would've given up long ago...
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Well, actually, it's just a label. It's just called by the game by default being the first one in the script. The exec command creates a new ScriptThread instance at the first label encountered in the file (actually, it's not needed - scripts will execute even if there's none), the thread command - starting at the label given, and the end command kills the thread. Waitexec and waitthread do exactly the same, however, they wait for the created thread to finish.

I'm trying to be a gentleman.-IvaN- wrote:HeheRookie One.pl {sfx} wrote:No problem, always willing to help, especially girls.![]()
!
Yippie! It works, the darn truck finally works
I had some strange wire stuff in the map as well (as I had to remake the truck several times and obviously didn't delete everything...
And I had to change the script as well... I worked on it for about two hours (in the early morning hours, that is about one am
). I tried every possible combination and also tried to put an 'end' and 'main' in every possible space
but finally I managed... Phew. I've just got no idea about scripting (the order of it etc.) I sure downloaded the scripting tutorials, but I think if you're a bl**dy noob like I am - no way...
Thanks for the help; yeah, you really are gentlemen
I had some strange wire stuff in the map as well (as I had to remake the truck several times and obviously didn't delete everything...
And I had to change the script as well... I worked on it for about two hours (in the early morning hours, that is about one am
Thanks for the help; yeah, you really are gentlemen
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Hi
Can someone explain to me how I can make an objective of this wire cutting ?
I used 2 objectives, destroy the V2 and destroy the Control Room.
Just like in V2.
But I also want the Allies to cut the wires on 3 trucks.
I used
to hide the cutwires.
And with this code I can cut the wires , but it's not an obbjective yet and the axis can cut the wires too
This is what I did to test it.
The 2 objectives (destroy V2 an CR) work fine
And also the allies can cut the wires, but the axis can too and it it's not an objective.
This are the settings for the triggers in Radiant:
classname: trigger_useonce
setthread: opentruck01_disabled
Can someone explain to me how I can make an objective of this wire cutting ?
I used 2 objectives, destroy the V2 and destroy the Control Room.
Just like in V2.
But I also want the Allies to cut the wires on 3 trucks.
I used
Code: Select all
$cutwire01 hide
$cutwire02 hide
$cutwire03 hide
And with this code I can cut the wires , but it's not an obbjective yet and the axis can cut the wires too
Code: Select all
//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
$wire01 remove
$opentruck01 playsound m1l2b_disabletruck
$cutwire01 show
level.opentruck01_disabled = 1
iprintlnbold_noloc "Wire 01 has been disabled!"
//thread nexttruck
end
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
$wire02 remove
$opentruck02 playsound m1l2b_disabletruck
$cutwire02 show
level.opentruck02_disabled = 1
iprintlnbold_noloc "Wire 02 has been disabled!"
//thread nexttruck
end
//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
$wire03 remove
$opentruck03 playsound m1l2b_disabletruck
$cutwire03 show
level.opentruck03_disabled = 1
iprintlnbold_noloc "Wire 03 has been disabled!"
//thread nexttruck
endThis is what I did to test it.
The 2 objectives (destroy V2 an CR) work fine
And also the allies can cut the wires, but the axis can too and it it's not an objective.
Code: Select all
main:
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" ""
$cutwire01 hide
$cutwire02 hide
$cutwire03 hide
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/nonameyet_obj.scr
exec global/ambient.scr obj_team2.scr
// Initialize the exploder subsystem
exec global/door_locked.scr::lock
thread global/exploder.scr::main
level waittill spawn
level.defusing_team = "axis
level.planting_team = "allies"
level.targets_to_destroy = 5
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // axis, allies, kills, or draw
level waittill roundstart
$v2_explode thread global/obj_dm.scr::bomb_thinker
$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
thread allies_win_bom
$v2_explode thread axis_win_timer
end
// Allied victory
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy) {
waitframe
}
teamwin allies
end
// Axis victory
axis_win_timer:
level waittill axiswin
end
//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
$wire01 remove
$opentruck01 playsound m1l2b_disabletruck
$cutwire01 show
level.opentruck01_disabled = 1
iprintlnbold_noloc "Wire 01 has been disabled!"
//thread nexttruck
end
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
$wire02 remove
$opentruck02 playsound m1l2b_disabletruck
$cutwire02 show
level.opentruck02_disabled = 1
iprintlnbold_noloc "Wire 02 has been disabled!"
//thread nexttruck
end
//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
$wire03 remove
$opentruck03 playsound m1l2b_disabletruck
$cutwire03 show
level.opentruck03_disabled = 1
iprintlnbold_noloc "Wire 03 has been disabled!"
//thread nexttruck
end
classname: trigger_useonce
setthread: opentruck01_disabled
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Change all the cut triggers from trigger_useonce to trigger_use and use this script:
Also corrected a typo (the allies would never win) and changed the level.targets_to_destroy value to 2 (it should be the number of the bombs only).
Code: Select all
main:
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" ""
$cutwire01 hide
$cutwire02 hide
$cutwire03 hide
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/nonameyet_obj.scr
exec global/ambient.scr obj_team2.scr
// Initialize the exploder subsystem
exec global/door_locked.scr::lock
thread global/exploder.scr::main
level waittill spawn
level.defusing_team = "axis
level.planting_team = "allies"
level.targets_to_destroy = 2
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // axis, allies, kills, or draw
level waittill roundstart
$v2_explode thread global/obj_dm.scr::bomb_thinker
$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
thread allies_win_bomb
$v2_explode thread axis_win_timer
end
// Allied victory
allies_win_bomb:
while((level.targets_destroyed < level.targets_to_destroy) && (level.opentruck01_disabled && level.opentruck02_disabled && level.opentruck03_disabled)) {
waitframe
}
teamwin allies
end
// Axis victory
axis_win_timer:
level waittill axiswin
end
//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
local.player = parm.other
if (local.player.dmteam == allies)
{
$wire01 remove
$opentruck01 playsound m1l2b_disabletruck
$cutwire01 show
level.opentruck01_disabled = 1
iprintlnbold_noloc "Wire 01 has been disabled!"
self delete
}
end
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
local.player = parm.other
if (local.player.dmteam == allies)
{
$wire02 remove
$opentruck02 playsound m1l2b_disabletruck
$cutwire02 show
level.opentruck02_disabled = 1
iprintlnbold_noloc "Wire 02 has been disabled!"
self delete
}
end
//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
local.player = parm.other
if (local.player.dmteam == allies)
{
$wire03 remove
$opentruck03 playsound m1l2b_disabletruck
$cutwire03 show
level.opentruck03_disabled = 1
iprintlnbold_noloc "Wire 03 has been disabled!"
self delete
}
end





