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

Members Online

»
0 Active | 54 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP 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
Next Page
subscribe
Author Topic: move1 = ("move1","targetname"), anything wrong?
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Jun. 3, 2009 07:10 am
Hello once again, MODSonline!

Got a script problem again,

The Console says:

******* script compile error *******
bad syntax: (file 'maps/mortarflight.gsc', line 12)
move1 = ("move1","targetname")
*
************************************

Is it anything bad with that Syntax?

Thankful for help[crazy]
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Jun. 3, 2009 07:18 am
Oops, found it out, i've forget "getent" and ";"
Mod, please close thread
Share |
ChusGMh
General Member
Since: Oct 7, 2008
Posts: 65
Last: Oct 4, 2010
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Jun. 3, 2009 07:19 am
Sure , u forget write the getent[jumping]

Code:
move1=getEnt("move1","targetname");



That will work[thumbs_up]


[moon]


edited on Jun. 3, 2009 10:20 am by arthasisgod
Share |
ChusGMh
General Member
Since: Oct 7, 2008
Posts: 65
Last: Oct 4, 2010
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Jun. 3, 2009 07:21 am
ah lol...ok... if u already fix it [confused]
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 06:48 am
Well, i got an other problem now;
"projectile waittill ("movedone");"

That isnt anything wrong, is it?
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 07:34 am
Zelzahim writes...
Quote:
Well, i got an other problem now;
"projectile waittill ("movedone");"

That isnt anything wrong, is it?


It is difficult to know if there is anything wrong, as you havent stated what the problem is. From the look of it, there isnt a syntax problem, but there might be an undefined entity problem.

Why dont you post the whole script so we can check it all in one go?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 07:48 am
The actual error might be on the line above
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 08:27 am
OKey, here we go:
main()
{
level._effect["morteffekt"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");
level._effect["morteffekt2"] = loadfx("fx/smoke/battlefield_smokebank_S.efx");
level._effect["morteffekt3"] = loadfx("fx/explosions/mortarExp_beach.efx");

thread mortarshot();

}
mortarshot()
{

trig = getent ("trig","targetname");
move1 = getent ("move1","targetname");
move2 = getent ("move2","targetname");
move3 = getent ("move3","targetname");
projectile = getent ("proj","targetname");
botlayer = getent ("botlayer","targetname");
toplayer = getent ("toplayer","targetname");

botlayer hide();

trig waittill ("trigger");

origin = move1 getorigin();
origin2 = move2 getorigin();
origin3 = move3 getorigin();

projectile moveto ((origin2),1);

projectile waittill ("movedone");

projectile moveto ((origin3),1);

projectile waittill ("movedone");

projectile delete();

playfx(level._effect["morteffect"], origin3);

playfx(level._effect["morteffect2"], origin3);

playfx(level._effect["morteffect3"], origin3);

botlayer show();

toplayer delete();

earthquake(0.3, 3, origin3, 5000);

}'

This window pops up when the mortar missile is about to land:

Quote:
Error

script runtime error

(see console for details)

(file 'maps/mortarflight.gsc', line 35)




Exit


then the console never pops up
Do i have to go for a developer SP?
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 11:29 am
I'm questining myself this:
Code:
// The projectile moves to the ground ?! Or into the air ?!
projectile moveto ((origin2),1);
projectile waittill ("movedone");

// The projectile moves through the ground ?! Or to the ground?!
projectile moveto ((origin3),1);
projectile waittill ("movedone"); // Projectile already moved ealier on !


Maybe you could try using 2 projectiles. (I'm not sure, since I don't know what you're exactly doing)
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 5, 2009 12:15 pm
Okey, listen here, i'll try to make it as clear as possible:

Im gonna make a mortar, when you uses the trigger(targetname - trig), a missile(targetname: Projectile) gets fired away, moving to the origins(targetnames: move1,move2,move3)
When it hits move3, it gets removed using the projectile delete(); syntax.
After that, it removes the topground(targetname - toplayer) and showing the botground(targetname - botlayer)
Then it plays the effects(level._effect: morteffekt1,morteffekt2 and morteffekt3).
To round it off, it uses an earthquake syntax to create the "boom effect".

THE END
Share |
Restricted Access Topic is Locked
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

»