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

Members Online

»
0 Active | 87 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
Next Page
subscribe
Author Topic: [help needed]
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Monday, Jul. 12, 2010 07:53 pm
hallo all I am making a ferris wheel with scripts.
I'm having a bit of a problem..

this is the Tutorial script im trying to use for the movement of the baskets http://modsonline.com/Tutorials-read-475.html

Code:

main()
{
Patanosta thread Patanosta_Move();
}
Patanosta_Move()
{
Patanosta = getent ("patanosta","targetname");
while (1)
{
Targ1 = getent(self.target,"targetname");
Targ2 = getent(Targ1.target,"targetname");
Targ3 = getent(Targ2.target,"targetname");
Targ4 = getent(Targ3.target,"targetname");
Targ5 = getent(Targ4.target,"targetname");
Targ6 = getent(Targ5.target,"targetname");
Targ7 = getent(Targ6.target,"targetname");
Targ8 = getent(Targ7.target,"targetname");
Targ9 = getent(Targ8.target,"targetname");
Targ10 = getent(Targ9.target,"targetname");
Targ11 = getent(Targ10.target,"targetname");
Targ12 = getent(Targ11.target,"targetname");
Targ13 = getent(Targ12.target,"targetname");
Targ14 = getent(Targ13.target,"targetname");
Targ15 = getent(Targ14.target,"targetname");
Targ16 = getent(Targ15.target,"targetname");
Targ17 = getent(Targ16.target,"targetname");
Targ18 = getent(Targ17.target,"targetname");
Targ19 = getent(Targ18.target,"targetname");
Targ20 = getent(Targ19.target,"targetname");
Targ21 = getent(Targ20.target,"targetname");
Targ22 = getent(Targ21.target,"targetname");
Targ23 = getent(Targ22.target,"targetname");
Targ24 = getent(Targ23.target,"targetname");

while (1)
{
self moveto (targ1.origin,20);
Targ1 moveto (targ2.origin,20);
Targ2 moveto (targ3.origin,20);
Targ3 moveto (targ4.origin,20);
Targ4 moveto (targ5.origin,20);
Targ5 moveto (targ6.origin,20);
Targ6 moveto (targ7.origin,20);
Targ7 moveto (targ8.origin,20);
Targ8 moveto (targ9.origin,20);
Targ9 moveto (targ10.origin,20);
Targ10 moveto (targ11.origin,20);
Targ11 moveto (targ12.origin,20);
Targ12 moveto (targ13.origin,20);
Targ13 moveto (targ14.origin,20);
Targ14 moveto (targ15.origin,20);
Targ15 moveto (targ16.origin,20);
Targ16 moveto (targ17.origin,20);
Targ17 moveto (targ18.origin,20);
Targ18 moveto (targ19.origin,20);
Targ19 moveto (targ20.origin,20);
Targ20 moveto (targ21.origin,20);
Targ21 moveto (targ22.origin,20);
Targ22 moveto (targ23.origin,20);
Targ23 moveto (self.origin,20);
Targ23 waittill ("movedone");
}
}


the error im getting is

unexpected end of file found: (file 'maps/mp/patanosta_move.gsc', line 63)


I don't get whats wrong with it I thought I needed the last basket added

Targ23 moveto (targ24.origin,20);
Targ24 moveto (self.origin,20);
Targ24 waittill ("movedone");


but I still get the same error so now im lost and confused. any help would be greet ty.

pic: http://i29.tinypic.com/256h6aa.jpg
vid: http://www.xfire.com/video/304dcf/
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Monday, Jul. 12, 2010 08:04 pm
Go back to the tutorial and check the script there.

Your script has a number of parts missing - all the code is all required.
Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Monday, Jul. 12, 2010 09:06 pm
Pedro699 writes...
Quote:
Go back to the tutorial and check the script there.

Your script has a number of parts missing - all the code is all required.


LOL working now, I was trying to put the script into its own .gsc but failed trying :p

I put it into the main .gsc and works fine ty again
Share |
hyper1234
General Member
Since: Mar 17, 2009
Posts: 358
Last: Apr 14, 2011
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Monday, Jul. 12, 2010 09:07 pm
Plus, you have 3x { open but are only closing 2 of them

} x2

Add a third } to the end of the script, it shud stop that error. But as pedro says, check the other script for the other parts to the script.

Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Wednesday, Jul. 14, 2010 12:27 pm
chears for your replys. Its working great, just need to add a 2nd script to get the frame to move with the baskets :D

http://www.xfire.com/video/30763a/
Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Wednesday, Jul. 14, 2010 06:50 pm
anyone know a script I can use to make the frame move? I can't find one anywhere that would work..

I was going to use something like this.
http://modsonline.com/Tutorials-read-566.html

I edited it so now it looks like this

Code:
main()
{
thread frame_rotate();
}
frame_rotate()
{
frame = getent("frame", "targetname");
while (1)
{
frame rotateyaw(360, 1.5, 0.7, 0.7);
frame waittill("rotatedone");
}
}


problem is I don't have a clue about scripting lol and im not even sure what I have is even right.

edited on Jul. 14, 2010 02:51 pm by 1coolboy8
Share |
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Wednesday, Jul. 14, 2010 10:52 pm
As far as I can see the script you have should work fine. As long as you put a brush with the origin texture on it in the center of the frame and selected everything when you made it a script_brushmodel, it should spin around that origin.

I would just change:
frame rotateyaw(360, 1.5, 0.7, 0.7);

to

frame rotateyaw(360, 20); (Change the 20 to whatever time it takes for one of the baskets to complete a rotation)

That way it takes the same amount of time for the frame complete a full rotation as it does for a basket.

It's been a while since i've done anything, so hopefully what I'm saying works / is correct haha
Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jul. 15, 2010 07:17 am
lolz script works... just not the way needed :P http://www.xfire.com/video/30a0b7/

anyone know what I need changed, to get it going the right way? [lol]
Share |
hyper1234
General Member
Since: Mar 17, 2009
Posts: 358
Last: Apr 14, 2011
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Thursday, Jul. 15, 2010 09:03 am
You need to change the rotateYaw to: rotateRoll or rotatePitch

Roll moves it on the x axis and Pitch moves it on the Z axis from what i remember.

Btw, nice ferris wheel, looks really detailed [thumbs_up]
[tongue]
Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jul. 15, 2010 01:55 pm
hyper1234 writes...
Quote:
You need to change the rotateYaw to: rotateRoll or rotatePitch

Roll moves it on the x axis and Pitch moves it on the Z axis from what i remember.

Btw, nice ferris wheel, looks really detailed [thumbs_up]
[tongue]


thanks dude for the rotateRoll / rotatePitch works great now, and ty for the compliment. looks more detail than there is :p

It does go off from the baskets a wee bit but should last upto 30mins without anyone seeing it lol

another thanks to all the other replys :D
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

»