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

Members Online

»
0 Active | 79 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: rain
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Sep. 29, 2006 11:31 pm
wheres the advanced portalling, outdoor portalling tutorial.
Share |
Trigonous
General Member
Since: Mar 8, 2006
Posts: 80
Last: Oct 3, 2006
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Sep. 29, 2006 11:33 pm
Sorry for not specifying, its in the Call of Duty tutorials, but getting into developer mode is the same (its at the bottom of the tutorial)
Share |
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Sep. 30, 2006 12:05 am
it still just says bad syntax
Share |
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Sep. 30, 2006 12:16 am
ok now its saying that this line in ur rain file is worng "level thread level.rain();"
Share |
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Sep. 30, 2006 12:31 am
edit last post: appearently line 24 "for(i = 0; i < players.size; i++) { "
is causing the error
Share |
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Sep. 30, 2006 01:05 am
There is some code missing after the " for " loop, as you can see the code goes from normal to italic.

Code:
//Script by rasta, please credit if used 
main() 
{ 
level thread level.rain(); 
} 

level.rain() 

{ 
zufall = RandomInt(100); 

while(1) { 


players = getentarray("player", "classname"); 

if(players.size > 0) { 

max_nodes = 20; 
max_nodes_per_player = max_nodes/players.size; 


for(ii=0;ii<max_nodes_per_player;ii++) {

for(i = 0; i < players.size; i++) { 

player = players[i]; 

if(isAlive(player)) { 

x= 350-randomfloat(700); 
y= 350-randomfloat(700); 

pos = player.origin +(x,y,200) ; 
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined); 

if(trace["fraction"] != 1) playfx(level.rain,trace["position"]); 
wait 0.05; 

} 
} 
} 
} 

wait 0.05; 
} 
}


Try this. Hopefully it will work now

edited on Sep. 29, 2006 09:07 pm by codmp
Share |
webber17
General Member
Since: Jul 28, 2006
Posts: 223
Last: Aug 31, 2007
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Sep. 30, 2006 02:19 am
nope[duh]
Share |
leonpadi
General Member
Since: May 8, 2006
Posts: 16
Last: Mar 14, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Friday, Nov. 17, 2006 01:07 pm
webber17 writes...
Quote:
nope[duh]

You must be sure that you use the correct script code.
There is a mistake in script code.
Try to copy paste this code, and this should work ;)

Code:

//Script by rasta, please credit if used 
main() 
{ 
     level thread rasta_cod2_rain(); 
} 

rasta_cod2_rain() 

{    
   zufall = RandomInt(100);       
          
   while(1) { 
       
    
      players = getentarray("player", "classname");       
       
      if(players.size > 0) { 
       
         max_nodes       = 20; 
         max_nodes_per_player    = max_nodes/players.size; 
       
       
         for(ii=0;ii<max_nodes_per_player;ii++) { 
          
            for(i = 0; i < players.size; i++) { 
                   
               player = players[i]; 
                      
               if(isAlive(player)) { 
                
                  x= 350-randomfloat(700); 
                  y= 350-randomfloat(700);                
             
                     pos = player.origin +(x,y,200) ;                   
                     trace = bulletTrace(pos,pos +(0,0,-250), true, undefined); 
                      
                     if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);             
                     wait 0.05; 
                                            
               }                   
            } 
         }                
      } 
       
      wait 0.05; 
   }    
}


...this is taken from Here!
Share |
sharkeh
General Member
Since: Sep 24, 2006
Posts: 20
Last: Dec 1, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Saturday, Nov. 18, 2006 02:28 am
A lot of people have this error because the version of the script in the tut section is also wrong and is what webber originally posted. Rasta needs to correct the tutorial.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Nov. 18, 2006 06:07 am
[banghead]Standard response number #101

WHC_Grassy writes...
Quote:
You have to be very careful when posting code into forums, most forums have control codes for things like italic text, bold text, etc etc
One of the control codes that causes 110% of the problems with code is the italics code [ i ], note the spaces either side of the i make it undetectable.
If I do it again without spaces I will change my text to italic letters like this , and the [ i ] control code is not visible, get it?

Also the character < is a redirect code in a lot of forums, as well as a character assiciated with HTML code.

Look what happens with this line,
"This is a test using < in the sentence"

Notice the sentence is complete?
If I do it again without spaces either side of the < character look what happens.

"This is a test using<in the sentence"

Now everything after and including the < character has now gone.
This one is the main cause of scripts being destroyed by people
pasting code incorrectly.

If I do it again inside a code quote box it will remain as intended,
Code:
"This is a test using<in the sentence"



So.... Always use the code option to quote script code in forums.


Hope this explains clearly what's happening.
Regards Grassy



Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»