#2: Your way is working but I would add another thread to make your script easier to read. Like this:
Code: Select all
main:
...
level waittill spawn
thread occupied_prep
...
end
occupied_prep:
$object hide
$object1 hide
$object2 hide
endModerator: Moderators
Code: Select all
main:
...
level waittill spawn
thread occupied_prep
...
end
occupied_prep:
$object hide
$object1 hide
$object2 hide
endCode: Select all
main:
//*** Scoreboard Messages And Image
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" "none"
local.master = spawn ScriptMaster
//local.master aliascache [aliasname] [soundfile] soundparms [basevolume] [randvolume] [basepitch] [randpitch] [mindist] [maxdist] [channel] loaded maps "obj dm"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
//exec maps/dm/yourmapnamehere_precache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/creditroom.scr
//exec global/weather.scr
//exec global/shutter.scr
$trigger_show_dest1 thread destination1
$trigger_show_dest2 thread destination2
$trigger_show_dest3 thread destination3
$trigger_show_dest4 thread destination4
level waittill spawn
//$room_occupied thread room_occupied
thread occupied_prep
end
//*** Room ***
occupied_prep:
$destination_signs hide
$speaker_room stoploopsound snd_room
$object hide
$object1 hide
$object2 hide
end
room_occupied:
self nottriggerable
$speaker_room loopsound snd_room
$object show
$object1 show
$object2 show
local.occupied = 1
while (local.occupied)
{
for (local.i = 1; local.i <= $player.size; local.i++)
{
if (isAlive($player[local.i]) && $player[local.i].dmteam != spectator)
{
if ($player[local.i] isTouching $room_occupied)
break
}
local.occupied = 0
$speaker_room stoploopsound snd_room
$object hide
$object1 hide
$object2 hide
$destination_signs hide
}
waitframe
}
self triggerable
end
destination1:
while (1)
{
$trigger_show_dest1 waittill trigger
$trigger_show_dest1 show $destination_signs
{
wait 2
}
}
end
destination2:
while (1)
{
$trigger_show_dest2 waittill trigger
$trigger_show_dest2 show $destination_signs
{
wait 2
}
}
end
destination3:
while (1)
{
$trigger_show_dest3 waittill trigger
$trigger_show_dest3 show $destination_signs
{
wait 2
}
}
end
destination4:
while (1)
{
$trigger_show_dest4 waittill trigger
$trigger_show_dest4 show $destination_signs
{
wait 2
}
}
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
endCode: Select all
$trigger_show_dest1 thread destination1
$trigger_show_dest2 thread destination2
$trigger_show_dest3 thread destination3
$trigger_show_dest4 thread destination4Code: Select all
destination1:
$trigger_show_dest1 nottriggerable
$destination_signs show
wait 2
$trigger_show_dest1 triggerable
end 
That's because of my unimaginable little understanding of scriptingwacko wrote:I might be completely wrong but I've never seen this show command the way you use it...
Code: Select all
main:
//*** Scoreboard Messages And Image
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" "none"
local.master = spawn ScriptMaster
//local.master aliascache [aliasname] [soundfile] soundparms [basevolume] [randvolume] [basepitch] [randpitch] [mindist] [maxdist] [channel] loaded maps "obj dm"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
//exec maps/dm/yourmapnamehere_precache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/creditroom.scr
//exec global/weather.scr
//exec global/shutter.scr
level waittill spawn
//$room_occupied thread room_occupied
thread occupied_prep
end
//*** Room ***
occupied_prep:
$speaker_room stoploopsound snd_room
$object hide
$object1 hide
$object2 hide
$destination_signs hide
end
room_occupied:
self nottriggerable
$speaker_room loopsound snd_room
$object show
$object1 show
$object2 show
local.occupied = 1
while (local.occupied)
{
for (local.i = 1; local.i <= $player.size; local.i++)
{
if (isAlive($player[local.i]) && $player[local.i].dmteam != spectator)
{
if ($player[local.i] isTouching $room_occupied)
break
}
local.occupied = 0
$speaker_room stoploopsound snd_room
$object hide
$object1 hide
$object2 hide
$destination_signs hide
}
waitframe
}
self triggerable
end
destination1:
$trigger_show_dest1 nottriggerable
$destination_signs show
wait 2
$trigger_show_dest1 triggerable
end
destination2:
$trigger_show_dest2 nottriggerable
$destination_signs show
wait 2
$trigger_show_dest2 triggerable
end
destination3:
$trigger_show_dest3 nottriggerable
$destination_signs show
wait 2
$trigger_show_dest3 triggerable
end
destination4:
$trigger_show_dest4 nottriggerable
$destination_signs show
wait 2
$trigger_show_dest4 triggerable
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
endI changed the script a bit, because all 4 triggers should do the same anyway. Now using one deactivates all of them, which imho makes sense. Give all of them setthread/destination (without _#)Kalti wrote: In conjunction with setting setthread/destination1 for all of the 4 triggers use.
I also changed your script to what Rookie once wrote. Hopefully this is working, just give it a try. My experience tho tells me that Rookie's scripting is quite reliableKalti wrote:I'm hiding "$destination_signs" in the "occupied_prep" thread and I'm using the 2nd part of the "room_occupied" thread to hide the "$destination_signs".
Code: Select all
room_occupied:
self nottriggerable
$speaker_room loopsound snd_room
$object show
$object1 show
$object2 show
local.occupied = 1
while (local.occupied)
{
for (local.i = 1; local.i <= $player.size; local.i++)
{
if (isAlive($player[local.i]) && $player[local.i].dmteam != spectator)
{
if ($player[local.i] isTouching $room_occupied)
{
local.occupied = 1 //not sure about this line
break
}
}
local.occupied = 0
$speaker_room stoploopsound snd_room
$object hide
$object1 hide
$object2 hide
$destination_signs hide
$trigger_show_dest1 triggerable
$trigger_show_dest2 triggerable
$trigger_show_dest3 triggerable
$trigger_show_dest4 triggerable
}
waitframe
}
self triggerable
end
destination:
$trigger_show_dest1 nottriggerable
$trigger_show_dest2 nottriggerable
$trigger_show_dest3 nottriggerable
$trigger_show_dest4 nottriggerable
$destination_signs show
wait 2
end