Page 2 of 3
Posted: Mon Jan 26, 2004 11:42 pm
by Bjarne BZR
vkdawg wrote:Will the Liberation mode work in Spearhead as well?
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 matter

)
Posted: Wed Jan 28, 2004 9:56 pm
by jv_map
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

Posted: Wed Jan 28, 2004 11:07 pm
by Bjarne BZR
jv_map wrote:Anyway Bjarne the new The Canal looks as good as the old one, but I suppose it's a lot better

well done

I dont know if I can really improve such an exelent map a lot

, but I have improved the FPS... the rest is mostly small stuff that I'm pretty sure noone will notice anyway
Tell me if you need additional supporting fire eh testers
jv_map wrote:P.S. set timescale to 0.5 or so to make nice explosion screenies

Dude... I do belive you were built out of good advice
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
end
( the test_winning_conditions method is a bit strange, as I just fooled around with it, just ignore it ).
If you can see any improvemets, don't be a stranger.

Posted: Fri Jan 30, 2004 7:32 am
by jv_map
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

Posted: Fri Jan 30, 2004 7:49 am
by Bjarne BZR
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

Would an "isAlive" test help here sensei?

Posted: Fri Jan 30, 2004 8:33 am
by jv_map
Bjarne BZR wrote: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

Would an "isAlive" test help here sensei?

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' player

Posted: Fri Jan 30, 2004 10:29 am
by Bjarne BZR
Hmmm... I see I've got my hands full in the lab this weekend.
Thanx for the heads up jv!

Posted: Fri Jan 30, 2004 12:57 pm
by Bjarne BZR
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

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?
Posted: Fri Jan 30, 2004 3:08 pm
by jv_map
You should remove the trigger after 2 or 3 frames

otherwise the server would crash within minutes

(no free edicts error).
Posted: Fri Jan 30, 2004 3:36 pm
by Bjarne BZR
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?
Posted: Fri Jan 30, 2004 3:52 pm
by jv_map
Well spectators can't trigger the trigger, so if it is triggered the player must be in the game (and hence have selected a weapon).
Hope that clears it up... not so good at explaining thingies

Posted: Fri Jan 30, 2004 11:21 pm
by Bjarne BZR
Ah, after reading your comments above again I now get what you are saying... thanx.
Any input on the "draw" problem above?
Posted: Fri Jan 30, 2004 11:29 pm
by Bjarne BZR
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 ).
Posted: Sun Feb 01, 2004 2:33 pm
by ~::(eagle)::~minieggman
what about a fre s1ngl3 pl4y3r m0d3 pl0z!
Posted: Sun Feb 01, 2004 2:50 pm
by Bjarne BZR
I don't understand what you are saying.