Welcome New User Home | Forums | Register | Login | Larger Font
Main-Menu
Home
Login
Register
Add Download
Add News
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
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 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
Zestycookie [Today]
DeekCiti [Forum]

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

download TeamSpeak

In-The-News
Friday, May. 16th
Video games 'do not' encourage violence
Friday, May. 16th
Site update
Friday, May. 16th
MODSonair Episode 127
Tuesday, May. 13th
Web hosting, you need?
Sunday, May. 11th
MODSonair 127 Live
Latest Poll
Would you subscribe for a maps/projects backup utility and service?
I'd pay just about anything for that. 2.06%
If it was cheap enough I would. 4.12%
Only if it came with my MODSonline subscription. 6.19%
I can backup my own files. 82.47%
Why would I backup my files? 5.15%
Read More...
8 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
[TUTORIAL] How to get rid of the wait time
CoD 4 Level Desi.. Posts: (5) Views: (112) by CoDLiNK
SP_Help!
CoD Level Design.. Posts: (2) Views: (13) by Sparks.
Kill3r's K3 MOD is DANGEROUS TO YOU AND YOUR S...
CoD4 General Gam.. Posts: (17) Views: (203) by 4mori_rabbit
train
CoD 4 Level Desi.. Posts: (1) Views: (9) by navysealsniper
Treyarch SPLITREASON.COM - Gear for Geeks and GamersBuy geek and gamer themed T-Shirts and Hats @ SplitReason.com!
Typhoon Servers
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.
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
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: 137
Last: May 14, 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: 10617
Last: May 16, 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: 137
Last: May 14, 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.
Preferred PLUS Member
Since: Oct 26, 2006
Posts: 970
Last: May 16, 2008
[view latest posts]
Level 7
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.
gotta change sig to a cod4 one :p

KiLL3R

DeekCiti
General Member
Since: Mar 13, 2008
Posts: 137
Last: May 14, 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.
Preferred PLUS Member
Since: Oct 26, 2006
Posts: 970
Last: May 16, 2008
[view latest posts]
Level 7
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.
gotta change sig to a cod4 one :p

KiLL3R

DeekCiti
General Member
Since: Mar 13, 2008
Posts: 137
Last: May 14, 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.
Preferred PLUS Member
Since: Oct 26, 2006
Posts: 970
Last: May 16, 2008
[view latest posts]
Level 7
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:
gotta change sig to a cod4 one :p

KiLL3R

DeekCiti
General Member
Since: Mar 13, 2008
Posts: 137
Last: May 14, 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.
Preferred PLUS Member
Since: Oct 26, 2006
Posts: 970
Last: May 16, 2008
[view latest posts]
Level 7
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
gotta change sig to a cod4 one :p

KiLL3R

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.com can be found News.php.
MODSonline Subscriptions
Partners
mp_carpark
modbase.be
Frag Universe
Battle for Europe COD2
Call of Duty Headquarters
The Firing Box
Quake 4 Mods for Dummies
Half-Life 2 Mods for Dummies
Ask About
Advertising
Friends
CoD 4 Base
After Life Gaming
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 127
MODSonair Episode 126
MODSonair Episode 125
MODSonair Episode 124
MODSonair Episode 123
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware