MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
happygilmore [Downl]
Puncster [Downl]
ukdjaj [Searc]
COLMAC [Forum]
nitojon [Downl]
Kingmarzo [Forum]
Trev [Downl]
rivoid [Forum]
phys1cxxx [Banne]
ROTCGuy [Forum]
beginRichy [Downl]
PainCausin... [Galle]

12 Members and 18 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Saturday, Nov. 22nd
CoD:WW Video Tutorial is up!
Friday, Nov. 21st
MODSonair Episode 154
Thursday, Nov. 20th
Call Of Duty World At War - Mod Tools
Wednesday, Nov. 19th
Half-Life 1 $0.98
Sunday, Nov. 16th
MODSonair 154 Live
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 8.37%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.49%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.98%
100% definitely NOT! 19.21%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.46%
Games are the devil! 1.48%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
uh prefabs?
CoD:WW Level Des.. Posts: (15) Views: (165) by COLMAC
Plz Help Radiant Error
CoD:WW Level Des.. Posts: (3) Views: (46) by COLMAC
Simple Problem
CoD:WW General G.. Posts: (2) Views: (17) by NovemberDobby
Cod4 Loadscreen problem , what a suprise
CoD 4 Level Desi.. Posts: (2) Views: (26) by COLMAC
Art of War Central Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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 4
Category: CoD 4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: Script not getting triggered
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 208
Last: Nov 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Thursday, May. 8, 2008 05:03 pm
Hey guys, I'm having trouble here getting this script to trigger. Everything seems to be working except the trigger itself. I created a script_origin to play my rain sound. The sound plays. In my alias, I have my rain sound set to play as an ambience. I have a secondary alias playing off this main rain sound, with an alias of building_null. This secondary alias is playing at a volume of 0. Both play at the same time and when I step into the trigger, it is supposed to play my secondary alias of building_null, but it doesn't.

I think the line: thread player_no_rain_sound(); is missing in the ladder half of the script because I have Iprints set up to debug. Shouldn't it be defined again somewhere in the if and else statements? The iprintlnbold("touching triggers"); constantly loops, which should be correct, but when I step into my trigger it should Print play buildingNull but it doesn't. My trigger has a targetname of no_rain_sound. Can anyone see why this is happening?

Here is the script:

Code:





edited on May. 8, 2008 05:06 pm by DeekCiti
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Thursday, May. 8, 2008 05:49 pm
My guess is, it has something to do with the player[i ].outside variable not being carried over between functions.

edited on May. 8, 2008 05:50 pm by The_Caretaker
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 208
Last: Nov 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Thursday, May. 8, 2008 05:55 pm
ok, do you know how to fix that?

I think it has to say self.outside because it only pertains to One player...

edited on May. 8, 2008 06:03 pm by DeekCiti
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1087
Last: Nov 15, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Thursday, May. 8, 2008 06:46 pm

Code:

is a single player
self is... well... isnt defined


Code:


edited on May. 8, 2008 06:47 pm by .KiLL3R.
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 208
Last: Nov 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Thursday, May. 8, 2008 07:19 pm
Using the script you posted above, it seems as though the trigger still doesn't hit.

Getting the loop of IPrint touching triggers

but when stepping into my trigger_multiple, I get no IPrint of play buildingNull

Like I mentioned earlier, my trigger_multiple has a targetname of "no_rain_sound", I'm certain that it is correctly set up.

Not sure what I'm missing, but it seems its not hitting that last Thread of: player_no_rain_sound()

Does the Trigger NEED to be linked or (W) to something in order for it to be valid? Because right now it is not linked to anything. It's just a loose trigger, with a targetname.
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1087
Last: Nov 15, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Friday, May. 9, 2008 01:58 am
the trigger doesnt need to be linked

you might not be giving it time to loop

"play buildingNull" will always show unless there are no triggers, same with "touching triggers"

Code:


edited on May. 9, 2008 02:00 am by .KiLL3R.
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 208
Last: Nov 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Friday, May. 9, 2008 02:26 am
ok, I commented out the first IPrint, and then tested it with the updated portion of the script and it does infact Print play buildingNull. So the script is working.

Although, since you changed the wait time to 1, instead of 25 could have been the reason why I didn't see it coming up in the IPrint. So yes, both IPrints do show.

Why it isn't working on the trigger, I don't know, but I do want to tell you that when I go near one of my script_origins, the building_null goes into effect. They are high enough that it wouldn't happen in my map, cause this is just a test map and the origins are near the ceiling. This is strange that the script_origin has a radius and actually plays the building_null. But since my buildings are square, it won't work as a radius, otherwise I'd have gone that route.
Remember how I set up my alias?


Code:



I'm simply testing it with a cricket sound, but overall, its the same thing as rain. I just need a longer sound to test it with.

So the script is working then, but for some reason the trigger is not. I'm this close to getting this working with the trigger... arrrgh
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1087
Last: Nov 15, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Friday, May. 9, 2008 02:38 am
you using a cricket sound for the null, and theres a few other errors


Code:
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 208
Last: Nov 2, 2008
[view latest posts]
Level 4
Category: CoD 4 Scripting
Posted: Friday, May. 9, 2008 03:03 am
Well, I was using the cricket sound for the null, but it was playing an 0 volume, so its the same thing as a null.

Alright, I've entered the information you have here into my alias. I believe you missed the "all_mp" on both lines, and also your min and max dist were switched, so I swapped them. No problem.

added the following to my zone file:

rawfile,sound/null.wav

Still the trigger isn't playing the null.

Just out of curiosity, why does the script want the building_null to constantly play? Shouldn't it only execute that portion of the script only when I hit the trigger?
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1087
Last: Nov 15, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Friday, May. 9, 2008 03:40 am
no no, you dont need the all_mp

you dont add sounds with rawfile,blah

add
sound,csvname,,,
to your maps csv

the script only plays building_null when self.outside is false
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
Battle for Europe COD2
The Firing Box
CODAddicts - Call of Duty News & Downloads
Call of Duty Headquarters
modbase.be
XoXide
Frag Universe
Ask About
Advertising
Friends
After Life Gaming
Great Gamer
Canada Kicks Ass Clan
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Video server move
Next Show
The next MODSonair show will air LIVE on:
11/23/2008 12:00 EST

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware