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
FiremanPaul [Today]
cabelera85 [Downl]
OutPoursTh... [Forum]
Lee [Today]
LS-R1-mini [Forum]
fredisdead [Forum]
RePhLeX [Forum]

7 Members and 23 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.42%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.5%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.82%
100% definitely NOT! 19.31%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.48%
Games are the devil! 1.49%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
compiling errors
CoD:WW Level Des.. Posts: (26) Views: (281) by COLMAC
Cod4 Loadscreen problem , what a suprise
CoD 4 Level Desi.. Posts: (1) Views: (17) by RePhLeX
Script compile error
CoD2 Scripting.. Posts: (2) Views: (16) by playername
No sound
CoD:WW Level Des.. Posts: (7) Views: (92) by Smithy
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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Previous Page
subscribe
Author Topic: Help with Arty system, FX Wont appear
saluden
General Member
Since: Sep 11, 2007
Posts: 55
Last: Nov 18, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 05:24 am
k here is my script.

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("radio_call");
wait (3);
impact1 playsound("incoming_mortar");
wait (2);
playfx(level._effect["flak_artillery"],(-204,20,34));
impact1 playsound("explosion");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
//level thread mortarhit_02(); //uncomment this line to add more mortars
}

after the arty hits, i cant do it again, how do i make it so, i can use it again after?
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 05:33 am
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");
while(1) // this will make the script repeat itself.
{
trig waittill ("trigger");
impact1 playsound("radio_call");
wait (3);
impact1 playsound("incoming_mortar");
wait (2);
playfx(level._effect["flak_artillery"],(-204,20,34));
impact1 playsound("explosion");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
}
}
saluden
General Member
Since: Sep 11, 2007
Posts: 55
Last: Nov 18, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 05:37 am
ty

edited on May. 18, 2008 05:38 am by saluden
saluden
General Member
Since: Sep 11, 2007
Posts: 55
Last: Nov 18, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 05:43 am
and how do i carry it on so i can add more arty hits? can u start me off XD

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("radio_call");
wait (3);
impact1 playsound("incoming_mortar");
wait (2);
playfx(level._effect["flak_artillery"],(-204,20,34));
impact1 playsound("explosion");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
level thread mortarhit_02();
}
mortarhit_02()
{
impact1 = getent ("mortar2","targetname");
origin = impact1 getorigin();
trig = getent ("mortar_trigger","targetname");
trig waittill ("trigger");
impact1 playsound("radio_call");
wait (3);
impact1 playsound("incoming_mortar");
wait (2);
playfx(level._effect["flak_artillery"],(-204,20,34));
impact1 playsound("explosion");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
}


is tyhat right?

edited on May. 18, 2008 05:53 am by saluden
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:52 am
but you should put a "wait ( xx )" in the end, to allow to complete the previous effect.

-----------------------------------------------------

I would like to make a question about it.

what difference is in using an "while(1)" instead of a "for(;;)" ?
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 06:45 am
Depends on if you want to make it hit the same spot again (the script I posted with the while(1) line in it, does that) or if you want it to hit other positions too..

While(1) and for(,,,) basically do the same thing.. no difference as far as I know.
saluden
General Member
Since: Sep 11, 2007
Posts: 55
Last: Nov 18, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 07:08 am
i want it to hit other places, so could u show me how to carry it on from the script? cause i tryed it and it just got bad syntax
saluden
General Member
Since: Sep 11, 2007
Posts: 55
Last: Nov 18, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 07:47 am
k guys i got

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");
while(1) // this will make the script repeat itself.
{
trig waittill ("trigger");
impact1 playsound("radio_call");
wait (3);
impact1 playsound("incoming_mortar");
wait (2);
playfx(level._effect["flak_artillery"],(-204,20,34));
impact1 playsound("explosion");
radiusDamage(origin, 500, 2000, 1000);
earthquake(0.75, 3, origin, 500);
wait (3);
}
}


and its working just like i wanted it too,

but how do i make more arty hit, can u guys start me off so i know what to do?
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, May. 18, 2008 08:00 am
Just do the same again, but with other targetnames in the script and in the map and other locations to hit..

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

mortarhit_01()
{
...
}

mortarhit_02()
{
...
}
Restricted Access Restricted Access
Page
Previous 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 can be found News.php.
Art of War Central
Partners
The Firing Box
Battle for Europe COD2
Frag Universe
Call of Duty Headquarters
modbase.be
XoXide
CODAddicts - Call of Duty News & Downloads
Ask About
Advertising
Friends
The Clan Database
CoD 4 Base
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