Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 12 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: sound trigger
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Thursday, Feb. 23, 2006 04:35 pm
ok ive read thru the tutorial on this and have had the example map running but can figure it out.
if i have a sound trigger in my map (with the sound script_model) with targetname doors what should i put in the gsc file to call the trigger?

Im a total noob at scripting so im probly missing the obvious, but im stuck

[crazy]
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Thursday, Feb. 23, 2006 05:14 pm
{
soundorigin = getent("nameofthesoundorigin","targetname"); //get place where the soun will come from
doors_trigger= getent ("doors", "targetname"); //get trigger
doors waittill ("trigger"); //wait untill triggered
soundorigin playsound("soundwhenopeningdoor"); //play the sound
}

edited on Feb. 23, 2006 12:15 pm by The_Caretaker
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Thursday, Feb. 23, 2006 07:18 pm
well its nearly working as i hear a wierd sound clip when i press the lift switch but no sound. Im not sure what to rename the trigger to in your example above as i seem to have a level.trig?
And i want to trigger three different sounds when this lift gsc runs, is that possible with thexample above?
Thanks again

main()
{
thread gate_init();

}
gate_init(){
level.gatemoving=false;
level.gate1 = getent("lift2DL","targetname");
level.gate2 = getent("lift2DR","targetname");
level.gate3 = getent("lift1bottom","targetname");
level.gate4 = getent("lift1top","targetname");
level.gate5 = getent("elevatormodel_2","targetname");
level.trig = getentarray ("elevatorswitchleft_1","targetname");

if (isdefined(level.trig))
for (i=0;i level.trigthread gate_handler();
}

gate_handler() {
while (1) {
self waittill ("trigger");
if (!level.gatemoving)
thread move_gate();
wait(1);
}
}
move_gate() {
level.gatemoving = true;
soundorigin = getent("woodenGates","targetname"); //get place where the sound will come from
doors_trigger = getent "elevatorswitchleft_1", "targetname"); //get trigger
//doors waittill ("trigger"); //wait untill triggered
soundorigin playsound("openingGates"); //play the sound


level.gate1 rotateto ((0,-90,0),1.66); //the bottom left door opens
level.gate2 rotateto ((0,90,0),1.66); //the bottom right door opens
}
[rocking]
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Thursday, Feb. 23, 2006 07:59 pm
Which tutorial did you read?

Not this one. That's our working elevator tutorial. There is a "sound" thing in there too.. though you might have to adjust for the CoDUO sounds.. oh.. and the switch model in that tutorial doesn't work.

I also suggest reading a couple of scripting tutorials (like the "moving things" from the CoD section) before attempting doing something like this.. Because if you just copy a script, errors are easily made.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»