Well, as I don't own Spearhead: I do not know yet... but as I don't own BT either, and my Liberation only uses rather basic scripting that works in MOH:AA - I can't really see any reason why it shouldent work in SH...( Or BT for that mattervkdawg wrote:Will the Liberation mode work in Spearhead as well?
The Canal by Flying Sheep [RELEASED]
Moderator: Moderators
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
I think someone made a liberation script for mohaa, but I can't remember who did it or if it was any good... in fact I can't remember for sure it was for aa at all
Anyway Bjarne the new The Canal looks as good as the old one, but I suppose it's a lot better
well done 
Tell me if you need additional supporting fire eh testers
P.S. set timescale to 0.5 or so to make nice explosion screenies
Anyway Bjarne the new The Canal looks as good as the old one, but I suppose it's a lot better
Tell me if you need additional supporting fire eh testers
P.S. set timescale to 0.5 or so to make nice explosion screenies
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
I dont know if I can really improve such an exelent map a lotjv_map wrote:Anyway Bjarne the new The Canal looks as good as the old one, but I suppose it's a lot betterwell done
Tell me if you need additional supporting fire eh testers
Dude... I do belive you were built out of good advicejv_map wrote:P.S. set timescale to 0.5 or so to make nice explosion screenies
And about the Ligeration mode: dosen't really matter as I've already made it. Here it is by the way ( just the empty Liberation code ):
Code: Select all
main:
local.master = spawn ScriptMaster
local.master aliascache track_switch1 sound/mechanics/M4_TrackLever.wav soundparms 1.2 0.0 1.2 0.0 320 2200 auto loaded maps "dm obj moh"
local.master aliascache elevator_start sound/null.wav soundparms 1.5 0.0 1.0 0.0 800 3000 auto loaded maps "dm obj moh"
local.master aliascache elevator_run sound/mechanics/Mec_ElevatorRun_01.wav soundparms 1.5 0.0 1.0 0.0 800 3000 auto loaded maps "dm obj moh"
local.master aliascache elevator_stop sound/null.wav soundparms 1.5 0.0 1.0 0.0 800 3000 auto loaded maps "dm obj moh"
level waitTill prespawn
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
exec global/DMprecache.scr
level.script = maps/obj/lib_canal.scr
waitthread initial_spawn_setup
level waittill spawn
// level waittill roundstart
thread start_liberation_system
end
start_liberation_system:
thread player_scanner
thread allied_jailbreak_sensor
thread axis_jailbreak_sensor
wait 10
thread activate_prison_spawn_setup
end
allied_jailbreak_sensor:
while(true)
{
$allied_jailbreak_trigger waittill trigger
if(parm.other.dmteam == axis)
{
parm.other iprint "You have released your friends!" 0
$allied_jailbreak_swithch playsound track_switch1
$allied_jailbreak_swithch anim move
waitthread allied_prison_open
$allied_jailbreak_swithch anim idle
}
else
{
if(parm.other.dmteam == allies)
{
parm.other iprint "Stop that!" 0
}
}
}
end
allied_prison_open:
$allies_prison_gate time 8
$allies_prison_gate playsound elevator_start
wait 1
$allies_prison_gate moveUp 120
$allies_prison_gate playsound elevator_run
$allies_prison_gate waitmove
$allies_prison_gate playsound elevator_stop
wait 10
$allies_prison_gate playsound elevator_start
wait 1
$allies_prison_gate moveDown 120
$allies_prison_gate playsound elevator_run
$allies_prison_gate waitmove
$allies_prison_gate playsound elevator_stop
end
axis_jailbreak_sensor:
while(true)
{
$axis_jailbreak_trigger waittill trigger
if(parm.other.dmteam == allies)
{
parm.other iprint "You have released your friends!" 0
$allied_jailbreak_swithch playsound track_switch1
$allied_jailbreak_swithch anim move
waitthread axis_prison_open
$allied_jailbreak_swithch anim idle
}
else
{
if(parm.other.dmteam == axis)
{
parm.other iprint "Stop that!" 0
}
}
}
end
axis_prison_open:
$axis_prison_gate time 8
$allies_prison_gate playsound elevator_start
wait 1
$axis_prison_gate moveUp 120
$axis_prison_gate playsound elevator_run
$axis_prison_gate waitmove
$axis_prison_gate playsound elevator_stop
wait 10
$allies_prison_gate playsound elevator_start
wait 1
$axis_prison_gate moveDown 120
$axis_prison_gate playsound elevator_run
$axis_prison_gate waitmove
$axis_prison_gate playsound elevator_stop
end
player_scanner:
while (true)
{
level.allies_in_game = 0
level.axis_in_game = 0
level.allies_in_prison = 0
level.axis_in_prison = 0
for(local.i = 1; local.i <= $player.size; local.i++)
{
waitthread is_in_prison $player[local.i]
waitframe
}
waitthread test_winning_conditions
wait 1
}
end
is_in_prison local.player:
if(local.player.dmteam == allies)
{
level.allies_in_game++
if(local.player istouching $axis_prison_volume)
{
level.allies_in_prison++
}
}
else
{
if(local.player.dmteam == axis)
{
level.axis_in_game++
if(local.player istouching $allied_prison_volume)
{
level.axis_in_prison++
}
}
}
end
test_winning_conditions:
iprintln "Ax: " level.axis_in_game ", Al: " level.allies_in_game ", AxP: " level.axis_in_prison ", AlP:" level.allies_in_prison
local.all_axis_in_prison = false
local.all_allies_in_prison = false
if(level.allies_in_game == level.allies_in_prison)
{
if(level.allies_in_prison > 0)
{
local.all_allies_in_prison = true
}
}
if( (level.axis_in_game == level.axis_in_prison) && (level.axis_in_prison > 0))
{
if (level.axis_in_prison > 0)
{
local.all_axis_in_prison = true
}
}
/*if(local.all_allies_in_prison && local.all_axis_in_prison)
{
draw
end
}
else
{*/
if(local.all_axis_in_prison)
{
iprintln "Allies win!"
// teamwin allies
}
else
{
if(local.all_allies_in_prison)
{
iprintln "Axis win!"
// teamwin axis
}
}
// }
end
initial_spawn_setup:
$allies_prison_spawn disablespawn
$axis_prison_spawn disablespawn
end
activate_prison_spawn_setup:
$allies_prison_spawn enablespawn
$axis_prison_spawn enablespawn
$allied_start_spawn disablespawn
$axis_start_spawn disablespawn
endIf you can see any improvemets, don't be a stranger.
Yeah I see some things that could be improved, though I'm confident the script is yet pretty good
The allied_jailbreak_sensor and axis_jailbreak_sensor threads could have been made into 1 thread with an argument for the team and an additional argument for the adjective (since the targetnaming isn't very convenient this would be necessary) so you'd get:
thread jailbreak_sensor allies allied
thread jailbreak_sensor axis axis
And then if you notice a bug in the sensor thread you'd only have to change it once. Same thing applies to the prison_open threads, although it will probably work fine the way it is.
Finally the is_in_prison thread is not completely bug/fool-proof... If victory conditions actually depend on the number of allied/axis players in the game, be aware that the level.axis_in_game variable also 'counts' players that are spectating whilst their dead or when they've just joined the game, chosen a side and not selected a weapon. This way they can prevent the other team from winning
The allied_jailbreak_sensor and axis_jailbreak_sensor threads could have been made into 1 thread with an argument for the team and an additional argument for the adjective (since the targetnaming isn't very convenient this would be necessary) so you'd get:
thread jailbreak_sensor allies allied
thread jailbreak_sensor axis axis
And then if you notice a bug in the sensor thread you'd only have to change it once. Same thing applies to the prison_open threads, although it will probably work fine the way it is.
Finally the is_in_prison thread is not completely bug/fool-proof... If victory conditions actually depend on the number of allied/axis players in the game, be aware that the level.axis_in_game variable also 'counts' players that are spectating whilst their dead or when they've just joined the game, chosen a side and not selected a weapon. This way they can prevent the other team from winning
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Would an "isAlive" test help here sensei?jv_map wrote:Finally the is_in_prison thread is not completely bug/fool-proof... If victory conditions actually depend on the number of allied/axis players in the game, be aware that the level.axis_in_game variable also 'counts' players that are spectating whilst their dead or when they've just joined the game, chosen a side and not selected a weapon. This way they can prevent the other team from winning
It would alieviate the problem, but it won't fix the issue of 'ghost' players that have selected a team but not yet a weapon. The only effective method I'm aware of is to spawn a trigger at their location, then if they trigger it the next frame you can be sure you're dealing with a 'real' playerBjarne BZR wrote:Would an "isAlive" test help here sensei?jv_map wrote:Finally the is_in_prison thread is not completely bug/fool-proof... If victory conditions actually depend on the number of allied/axis players in the game, be aware that the level.axis_in_game variable also 'counts' players that are spectating whilst their dead or when they've just joined the game, chosen a side and not selected a weapon. This way they can prevent the other team from winning
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Not sure I follow you here... if the player is in this "limbo" state and does not move... won't he trigger it the next round again?jv_map wrote:The only effective method I'm aware of is to spawn a trigger at their location, then if they trigger it the next frame you can be sure you're dealing with a 'real' player
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Yes, but I don't understand how spawning a trigger would help the problem of detecting "players that have selected team but not a weapon"... explain it to me as if I was a 5 year old kid 
And also is there a command to end a game in a draw?
Like:...but resulting in a draw result?
And also is there a command to end a game in a draw?
Like:
Code: Select all
teamwin axis
Last edited by Bjarne BZR on Fri Jan 30, 2004 3:53 pm, edited 1 time in total.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Alright!
I released the Objective and Death Match versions today
Download them both here!
( for screens see the first post in this thread ).
Ive done some BETA testing on them and they SHOULD be error free, but if you find any errors in them, please report them to me ( check te readme file for details ).
I released the Objective and Death Match versions today
Download them both here!
( for screens see the first post in this thread ).
Ive done some BETA testing on them and they SHOULD be error free, but if you find any errors in them, please report them to me ( check te readme file for details ).
-
~::(eagle)::~minieggman
- Corporal
- Posts: 38
- Joined: Wed Jan 28, 2004 8:24 pm
what about a fre s1ngl3 pl4y3r m0d3 pl0z!
e-mail runecool2@aol.com to join the MOH:AA Black hawk down mod!
Black Hawk Down MOD! You gotta be in it to win it!
Black Hawk Down MOD! You gotta be in it to win it!
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:

