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

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: skript newbie needs help with tutorial: unknown funktion
[ST]simon[RAP]
General Member
Since: Jul 2, 2009
Posts: 42
Last: Jun 20, 2010
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 06:20 am
hi guys!
these are my first attempts to script so im a noob.
therefore i tryed this tut:
Quote:

i dont really understand the script and it doesnt work..
when i compile the reflections it says something about that this funktion is unknown:
mapsmp_fx::loopfx("fire", (-864, -305, 58), 3);
do i have to replace mapsmp with something like my map name?
my gsc looks like that:
Quote:

main()
{


level._effect["fire"] = loadfx ("fx/fire/fire_barrel_fragm_a.efx");
mp_testhotel_fx::loopfx("fire", (120, 472, 56), 3);
level._effect["smoke"] = loadfx ("fx/smoke/thin_black_smoke_M.efx");
mapsmp_fx::loopfx("smoke", (116, 468, 52), 3);
mapsmp_load::main();


game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";


setdvar( "r_specularcolorscale", "1" );
setdvar("r_glowbloomintensity0",".1");
setdvar("r_glowbloomintensity1",".1");
setdvar("r_glowskybleedintensity0",".1");
setdvar("compassmaxrange","1500");

}

what have done wrong?
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 07:34 am
When the tutorial was submitted the "/" seemed to have been corrupted, fixed:

Code:

main()
{


level._effect["fire"] = loadfx ("fx/fire/fire_barrel_fragm_a.efx"); 
mp_testhotel_fx::loopfx("fire", (120, 472, 56), 3); 
level._effect["smoke"] = loadfx ("fx/smoke/thin_black_smoke_M.efx"); 
maps/mp/_fx::loopfx("smoke", (116, 468, 52), 3); 
maps/mp/_load::main();


game["allies"] = "marines"; 
game["axis"] = "opfor"; 
game["attackers"] = "axis"; 
game["defenders"] = "allies"; 
game["allies_soldiertype"] = "desert"; 
game["axis_soldiertype"] = "desert"; 


setdvar( "r_specularcolorscale", "1" ); 
setdvar("r_glowbloomintensity0",".1"); 
setdvar("r_glowbloomintensity1",".1"); 
setdvar("r_glowskybleedintensity0",".1"); 
setdvar("compassmaxrange","1500"); 

}

Share |
[ST]simon[RAP]
General Member
Since: Jul 2, 2009
Posts: 42
Last: Jun 20, 2010
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 08:00 am
hi thanks 4 helping!
still doesnt work though :(
if have my gsc like this:
Code:
mp_testhotel_fx::loopfx("fire", (184, 488, 60), 3);

it says something like unknown funktion mp_testhotel_fx...
if i have it like this:
Code:
maps/mp/_fx::loopfx("fire", (184, 488, 60), 3);

it says syntax error
whats still wrong?


PS: where would i find something like that:
http://wiki.infinityward.com/index.php/Script_Commands
edited on Jun. 6, 2010 04:13 am by [ST]simon[RAP]
Share |
[ST]simon[RAP]
General Member
Since: Jul 2, 2009
Posts: 42
Last: Jun 20, 2010
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 08:48 am
i tryed some stuff...(which is probally complete bullshit^^)
1st i looked for some skript commands
i didnt found loopfx
only playloopedfx so did this:
Code:
mp_testhotel_fx::playloopedfx("fire", (184, 488, 60), 3);

then it says cant find the script mp_testhotel_fx
so i did this cause mp_testhotel_fx is actually in maps/mp
Code:
maps/mp/mp_testhotel_fx::playloopedfx("fire", (184, 488, 60), 3);
now it says incorrect syntax :(
my mp_testhotel_fx.gsc contains only this:
Code:
main() { level._effect["fire"] = loadfx ("fx/fire/fire_barrel_fragm_a.efx"); }

greetz
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 08:53 am
hmm, sorry mate it's 9:50am and I haven't been to sleep yet. Load your level with developer set to 2:

/developer 2
/devmap yourmapname

And type the exact error, the console should display a more in depth message, specifically the exact syntax error.

The main problem with this is the FX tutorial itself, it works and all but looks like a completely different way to how the developers handled it. Now I don't have COD4 installed but it deserves a proper tutorial, if I install again it'll be on my list of things to do... and if I suspect right that it uses clientscripts you could always check out a World at War tutorial on FX as there won't be any major differences.
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Sunday, Jun. 6, 2010 05:37 pm
Try this:

Code:
main()
{
	level._effect["fire"] = LoadFX( "fx/fire/fire_barrel_fragm_a" );
	level._effect["smoke"] = LoadFX( "fx/smoke/thin_black_smoke_M" );
	
	playLoopedFX( level._effect["fire"], 3, ( 120, 472, 56 ) );
	playLoopedFX( level._effect["smoke"], 3, (116, 468, 52) );
	
	maps\mp\_load::main();

	game["allies"] = "marines";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "desert";
	game["axis_soldiertype"] = "desert";

	setDvar( "r_specularcolorscale", "1" );
	setDvar( "r_glowbloomintensity0", ".1" );
	setDvar( "r_glowbloomintensity1", ".1" );
	setDvar( "r_glowskybleedintensity0", ".1" );
	setDvar( "compassmaxrange", "1500" );
}
Share |
[ST]simon[RAP]
General Member
Since: Jul 2, 2009
Posts: 42
Last: Jun 20, 2010
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Monday, Jun. 7, 2010 08:17 am
haw can i copy the console? does the console show up if u tipe ° into the command line (^ or ~))
sry for this stupid question
i tryed ur skript xylozi but it says: skript runtime error effect name should start after effect name
thx for trying though
Share |
[ST]simon[RAP]
General Member
Since: Jul 2, 2009
Posts: 42
Last: Jun 20, 2010
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Thursday, Jun. 10, 2010 05:51 am
hi i tryed some new stuff i found in www
mp_testhotel.gsc
Code:



main()
{

maps\mp\_load::main();
maps\mp\mp_testhotel_fx::main();


game["allies"] = "marines"; 
game["axis"] = "opfor"; 
game["attackers"] = "axis"; 
game["defenders"] = "allies"; 
game["allies_soldiertype"] = "desert"; 
game["axis_soldiertype"] = "desert"; 


setdvar( "r_specularcolorscale", "1" ); 
setdvar("r_glowbloomintensity0",".1"); 
setdvar("r_glowbloomintensity1",".1"); 
setdvar("r_glowskybleedintensity0",".1"); 


}


createfx/mp_testhotel_fx
Code:
 //_createfx generated. Do not touch!!
main()
{


	ent = maps\mp\_utility::createOneshotEffect( "fire" );
	ent.v[ "origin" ] = ( 1, 1, 60 );
	ent.v[ "delay" ] = -15;

	ent = maps\mp\_utility::createOneshotEffect( "smoke" );
	ent.v[ "origin" ] = ( 1, 1, 59 );
	ent.v[ "delay" ] = -15;
	
}
Code:

main()
{
level._effect["fire"] = loadfx ("fire/fire_barrel_fragm_a");
level._effect["smoke"] = loadfx ("smoke/car_damage_blacksmoke");

/#

if (getdvar("clientSideEffects")!="1")
maps\createfx\mp_testhotel_fx::main();
#/


}

folling errors:
ingameconsole:
ERROR: unexpected text 'ent.v["delay"] =-15
ingame(modwarfare):
no effects
greetz


edited on Jun. 10, 2010 02:37 am by [ST]simon[RAP]

edited on Jun. 10, 2010 02:40 am by [ST]simon[RAP]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»