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

Members Online

»
0 Active | 5 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
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: efx script error
-havoc-
General Member
Since: Aug 24, 2006
Posts: 39
Last: Dec 16, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Thursday, Dec. 14, 2006 01:19 am
Code:
main()
{
thread fx();
}

fx()
{
fx = getent("fx","targetname");
	
ex1 = loadfx("fx/explosions/treeburst_a.efx");
while(1)
{
playfx(ex1, fx.origin);
fx waittill ("movedone")
}
}
is the fx script im using but i cant find the bad syntax, if some1 could point it out thatd be great thx

edited on Dec. 13, 2006 08:20 pm by -havoc-
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD Mapping
Posted: Thursday, Dec. 14, 2006 09:18 am
1) The syntax error is your missing a semi colon after the movedone statement.

2) Just to make you aware, it's not good practice to assign names to entities with the same name as your functions. You have three fx names all relating to different things. A function called fx, an alias called fx which is assigned to an entity named fx. :-)

3) In this script you are playing an effect at an origin, but you have not defined how long the effect plays for.

4) Then you are using an waittill("movedone"); statement when there has been no move commands given previously on the entity.
In this instance the script will wait for ever on this line for a move to complete that has never started. :)

What is it you are trying to do, maybe I can help you get it working.

Grassy

edited on Dec. 14, 2006 04:22 am by WHC_Grassy
Share |
-havoc-
General Member
Since: Aug 24, 2006
Posts: 39
Last: Dec 16, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Thursday, Dec. 14, 2006 07:37 pm
lol yah [drink],my map now runs but the fx doesnt happen or it happens so fas i cant c it lol, can u help me edit the script properly? thx


-havoc-
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD Mapping
Posted: Friday, Dec. 15, 2006 07:50 am
Yeah no probs,
1) Is this for single player or multi?

2) What triggers the effect?
Do you have a trigger somewhere that needs a player to go through it? Or will you just play the effect once after a specified wait period?

Grassy
Share |
-havoc-
General Member
Since: Aug 24, 2006
Posts: 39
Last: Dec 16, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Friday, Dec. 15, 2006 10:53 pm
wait lol , its working now lol :D sry [biggrin] lol but i need help on a diff script ifu could tell me wuts rong thatd be great :D

Code:
main()
{
thread platforms();
}

platforms()
{
platform1 = getent ("platform1","targetname");
platform2 = getent ("platform2","targetname");
platform3 = getent ("platform3","targetname");
platform4 = getent ("platform4","targetname");
platform5 = getent ("platform5","targetname");
platform6 = getent ("platform6","targetname");
platform7 = getent ("platform7","targetname");
platform8 = getent ("platform8","targetname");
platform9 = getent ("platform9","targetname");
platform10 = getent ("platform10","targetname");
platform11 = getent ("platform11","targetname");
platform12 = getent ("platform12","targetname");
platform13 = getent ("platform13","targetname");
platform14 = getent ("platform14","targetname");
platform15 = getent ("platform15","targetname");
trigger1 = getent ("switch1","targetname");
trigger2 = getent ("switch2","targetname");
trigger3 = getent ("switch3","targetname");
trigger4 = getent ("switch4","targetname");
trigger5 = getent ("switch5","targetname");
trigger6 = getent ("switch6","targetname");
trigger7 = getent ("switch7","targetname");
trigger8 = getent ("switch8","targetname");
trigger9 = getent ("switch9","targetname");
trigger10 = getent ("switch10","targetname");
trigger11 = getent ("switch11","targetname");
trigger12 = getent ("switch12","targetname");
trigger13 = getent ("switch13","targetname");
trigger14 = getent ("switch14","targetname");
trigger15 = getent ("switch15","targetname");
{
trigger1 waittill ("trigger");
wait(1);
platform1 moveY (266,0.5,0.2,0.2);
platform1 waittill ("movedone");
{
trigger2 waittill ("trigger");
wait(1);
platform2 moveY (-256,0.5,0.2,0.2);
platform2 waittill ("movedone");
{
trigger3 waittill ("trigger");
wait(1);
platform3 moveY (256,0.5,0.2,0.2);
platform3 waittill ("movedone");
{
trigger4 waittill ("trigger");
wait(1);
platform4 moveY (266,0.5,0.2,0.2);
platform4 waittill ("movedone");
{
trigger5 waittill ("trigger");
wait(1);
platform5 moveY (256,0.5,0.2,0.2);
platform5 waittill ("movedone");
{
trigger6 waittill ("trigger");
wait(1);
platform6 moveX (-256,0.5,0.2,0.2);
platform6 waittill ("movedone");
{
trigger7 waittill ("trigger");
wait(1);
platform7 moveX (256,0.5,0.2,0.2);
platform7 waittill ("movedone");
{
trigger8 waittill ("trigger");
wait(1);
platform8 moveX (254,0.5,0.2,0.2);
platform8 waittill ("movedone");
{
trigger9 waittill ("trigger");
wait(1);
platform9 moveX (256,0.5,0.2,0.2);
platform9 waittill ("movedone");
{
trigger10 waittill ("trigger");
wait(1);
platform10 moveY (-257,0.5,0.2,0.2);
platform10 waittill ("movedone");
{
trigger11 waittill ("trigger");
wait(1);
platform11 moveX (257,0.5,0.2,0.2);
platform11 waittill ("movedone");
{
trigger12 waittill ("trigger");
wait(1);
platform12 moveX (258,0.5,0.2,0.2);
platform12 waittill ("movedone");
{
trigger13 waittill ("trigger");
wait(1);
platform13 moveX (254,0.5,0.2,0.2);
platform13 waittill ("movedone");
{
trigger14 waittill ("trigger");
wait(1);
platform14 moveX (256,0.5,0.2,0.2);
platform14 waittill ("movedone");
{
trigger15 waittill ("trigger");
wait(1);
platform15 moveY (257,0.5,0.2,0.2);
platform15 waittill ("movedone");
{
{
is wut im using for platforms script, i think its good but theres an unknown function somewhere ;\ thx ;P :D
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD Mapping
Posted: Friday, Dec. 15, 2006 11:13 pm
Get rid of all the open braces { after the first one in your function platforms.

And place a closing brace } for that function.

A function should have only one opening brace and only one closing brace.

platforms
{
...
...
..body of function code..
.
....
}

Grassy
Share |
Creator
General Member
Since: Mar 30, 2006
Posts: 240
Last: Feb 3, 2008
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Friday, Dec. 15, 2006 11:15 pm
platforms
{
...
...
..body of function code..
.
....
}
}

2: }
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD Mapping

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

»