Welcome New User Home | Forums | Register | Login | Larger Font
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
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
foyleman [Messa]
ICE1989 [Downl]
games12345 [Downl]
sansoclute [Downl]
Bliccer [Forum]
FieldyX [Forum]

6 Members and 11 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Jul. 20th
MODSonair 137 LIVE
Friday, Jul. 18th
MODSonair Episode 136
Thursday, Jul. 17th
E3 2008: Daily Recap
Monday, Jul. 14th
E3 2008 Latest News
Sunday, Jul. 13th
MODSonair 136 LIVE
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline. 75.94%
I could see a benefit of a Wiki. 4.51%
I think it would take away from the community. 4.51%
Wiki sites are never good. 3.76%
Wiki... isn't that Buck Roger's robot slave? 11.28%
Read More...
11 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Submission of prefabs
CoD 4 Level Desi.. Posts: (3) Views: (28) by foyleman
fps lag in map
CoDUO Level Desi.. Posts: (10) Views: (80) by crazykillermike
Cut round hole for circular Cave. HOW?
CoD 4 Level Desi.. Posts: (1) Views: (11) by pigshyte
CoD4 intro screens
CoD 4 Level Desi.. Posts: (4) Views: (72) by obiwanbul
Google 468 Banner Quake 4 Mods for Dummies
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.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: Help with Arty system, FX Wont appear
saluden
General Member
Since: Sep 11, 2007
Posts: 32
Last: May 18, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, May. 17, 2008 10:06 am
ok so i made a arty system with rastas help, but the FX wont appear when the arty hits here is scripts, is anything wrong?

main()
{
level._effect["flak_artillery"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");
thread mortarhit_01 ();
}

mortarhit_01()
{
impact1 = getent ("mortar1","targetname");
origin = impact1 getorigin();
trig = getent ("mortar_trigger","targetname");
trig waittill ("trigger");
impact1 playsound("incoming_mortar");
wait (2);
maps\mp\_fx::OneShotfx(level._effect["flak_artillery"],(-204,20,34), 0.3);
impact1 playsound("grass");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
//level thread mortarhit_02(); //uncomment this line to add more mortars
}

i also made a _fx.gsc


main()
{
precacheFX();

}

precacheFX()
{
level._effect["flak_artillery"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");

}

and it still wont appear, HELP!!
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11059
Last: Jul 24, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, May. 17, 2008 10:21 am
Do the sound and radiusDamage work?

Try

playfx(level._effect["flak_artillery",(-204,20,34));

instead of

maps\mp\_fx::OneShotfx(level._effect["flak_artillery"],(-204,20,34), 0.3);



Also, in your _fx .gsc you only load an effect you also load in your main function in your other .gsc file.
Do you have a mp_mymapname.gsc file which calls the gsc files you posted here?
Rasta
Preferred Member
Since: Apr 10, 2004
Posts: 4090
Last: Jul 24, 2008
[view latest posts]
Level 9
Forum Moderator
Category: CoD2 Scripting
Posted: Saturday, May. 17, 2008 10:46 am
As caretaker said, make sure you are loading you _load.gsc this handles all the main function the script uses.

Post your entire .gsc file.
Go ahead... You Play I Mod : MODSonline.com
Support Modsonline by becoming a PREFERRED MEMBER today
Have you heard the MODSonair Podcast?: www.modsonair.com
We are game enthusiasts from the MODSonline.com community bringing you news, updates and opinions of the week's current events. Tune in every Friday for a new episode.
saluden
General Member
Since: Sep 11, 2007
Posts: 32
Last: May 18, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, May. 17, 2008 11:17 am
main()
{

maps\mp\_load::main();
maps\mp\arty::main();
maps\mp\mp_arty_fx::main();

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

//setCvar("r_glowbloomintensity0", ".25");
//setCvar("r_glowbloomintensity1", ".25");
//setcvar("r_glowskybleedintensity0",".3");

}



and sounds



name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#sounds,,,,,,,,,,,,,,,,,,,,,,,
incoming_mortar,,Explosions/artillery_incoming01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_arty

and yes sounds work
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, May. 17, 2008 09:36 pm
I think that you don't need the file "mp_arty_fx" , since the effect already is "precache" in the "main" of arty.gsc

make sure you are usinng the appropriate coordinates.
try :

playfx(level._effect["flak_artillery"], origin );


on the other hand, I see that you are not using a vector in the third arguments


Quote:

playfx ( [effect id], [position of effect], [forward vector], [up vector] );




good luck! ;)

PD:Excuse my language. I don't speak English

edited on May. 17, 2008 09:40 pm by alfabigo
saluden
General Member
Since: Sep 11, 2007
Posts: 32
Last: May 18, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 01:56 am
i tryed ur line care and it said "bad syntax"
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 02:50 am
saluden writes...
Quote:
i tryed ur line care and it said "bad syntax"


This line has a bit mistake should be:


Quote:


playfx(level._effect["flak_artillery"],(-204,20,34));


tell me if u have attempted what I said
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11059
Last: Jul 24, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 03:03 am
1) Do not copy code, always type it yourself. That way typos (as the one I made) can be avoided. I just now noticed a missing ].

2) 'bas=d syntax' doesn't help much. Pull down the console and see WHERE the bad syntax happens, it usually tells you the exact line it is happening.
saluden
General Member
Since: Sep 11, 2007
Posts: 32
Last: May 18, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 04:26 am
when i changed the mistake, the FX worked XD, thanks all for your help.
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 05:17 am
what says Caretaker ,about point 2. it is highly advisable to do . but I have noticed that the bad syntax happens , just an previous line. not exactly same line.
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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
The Firing Box
Battle for Europe COD2
XoXide
Call of Duty Headquarters
My Topsites List
modbase.be
Frag Universe
Websites4Clans
Ask About
Advertising
Friends
Volcano
ModTheater
After Life Gaming
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 136
MODSonair Episode 135
MODSonair Episode 134
MODSonair Episode 133
MODSonair Special CoD:WW Episode
Next Show
The next MODSonair show will air LIVE on:
07/27/2008 11:00 EDT

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