!! Great Job So Far !!
you said
try putting this at the top of you script for the sound
local.master = spawn scriptmaster
local.master aliascache myalarm sound/mechanics/Mec_Alarm_05.wav soundparms 0.3 0.0 1.0 0.0 900 20000 item loaded maps "dm obj"
then change the thread like this
Code:
i gues I finally managed to do that now
But
it works fine for Axis now:
just the way ..it should be..
Code: Select all
// MAPNAME: pulslight
// ARCHITECTURE: Cigs
// SCRIPTING: bdbodger (also Krane) :)
main:
local.master = spawn scriptmaster
local.master aliascache myalarm sound/mechanics/Mec_Alarm_05.wav soundparms 0.3 0.0 1.0 0.0 900 20000 item loaded maps "dm obj"
// set scoreboard messages
setcvar "g_obj_alliedtext1" "pulslight"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "pulslight"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" ""
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/pulslight.scr
// prep
$pulslight light(1 0 0)
$pulslight lightRadius 100 // CONTROL THE RADIUS OF THE LIGHT
$pulslight notsolid
$pulslight lightoff
for(local.c = 1;local.c <= $pulslight_corona.size;local.c++)
$pulslight_corona[local.c] hide
level waittill spawn
end
//--------------------------------------------------------------
trigger_pulslight:
if !((level.pulseing == 1) && (parm.other.dmteam == "axis")) // allows only one thread to run
{
level.pulseing = 1
self nottriggerable
local.timer = 0
while(local.timer < 8)
{
for(local.c = 1;local.c <= $pulslight_corona.size;local.c++)
$pulslight_corona[local.c] show
for(local.c = 1;local.c <= $pulslight.size;local.c++)
{
$pulslight[local.c] lighton
$pulslight[local.c] playsound myalarm
}
wait .5
for(local.c = 1;local.c <= $pulslight.size;local.c++)
$pulslight[local.c] lightoff
for(local.c = 1;local.c <= $pulslight_corona.size;local.c++)
$pulslight_corona[local.c] hide
wait .5
local.timer++
}
level.pulseing = 0
wait 5
self triggerable
}
end
so the trigger & pulslight & alarmsound all work fine together when an Axis triggers it
good job ( & I get it too!

I read the "Adding Custom sounds :: jv_map" tut )
...though it go's off for alied too... but NOT in the bad way (the thread runs one time :] because i place
this (*) under the thread! ) ... BUT
it should just be nottriggrable for allied at all times !!
-
i tried placing
this (*) under the first"if !()"
Code: Select all
trigger_pulslight:
if !()
{
...
}
if !((level.pulseing == 1) && (parm.other.dmteam == "allied")) // allows only one thread to run
{
level.pulseing = 1
self nottriggerable
wait 2
self triggerable
level.pulseing = 0
}
end

so it never runs 6 times in a row anymore

again it shouldn't be activated when dmteam allied touch,,, ?
-
now there's a secondthing allready in my mind too :/
the sound will probably be heard ALL over the map
hmm
I read how to target a vis_leafgroup (where a speaker is in) so that "speakers" aren't heard in the area the targetting vis_leafgroup secludes.
like this:
1 vis_leaffgroup arround the "sound_model" (don't know what's use as sound entities!)

with targetname/speakervis
all the places the sound shouldn't be heard should have vis_leafgroups that have a tartget/speakervis
1 vis
... but can it be done here ? & what about the
local.master = spawn scriptmaster then?
i dno
thanks for helping out sofar
it has allready been great
