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

Members Online

»
0 Active | 56 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Scripting Erroe (Whats Wrong?)
Pop322
General Member
Since: Oct 26, 2005
Posts: 50
Last: Jun 11, 2007
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 03:23 pm
Hey ppl,

i have ben following the tutorial on how to script a moving object and i have had a go at my own script. What im aiming for is a shooting range sorta thing so you fire at your target then push a button thats brings the target to you to see the accuracy. heres my script

Code:
main()
{

thread targ();

targ = getent ("pistol1","targetname");
trig = getent ("pistol1trigger","targetname");
trig waittill ("trigger")
targ movex ( 132, 1);  //Something wrong here? (As said by Console)
targ waittill ("movedone");
wait (3);
targ movex ( -132, 1);
targ waittill ("movedone");



if anyone could help this would be greatly appreciated. Thnx
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 04:27 pm
Try, targ movex (132, 1, 0, 0);


change the other one too

Good luck

dadofazz

edit:- if it moves it will be very fast, if you wish to slow it increase the second number. (trial and error)

edited on Jan. 22, 2006 11:30 am by DadofAzz

edited on Jan. 22, 2006 11:30 am by DadofAzz
Share |
Pop322
General Member
Since: Oct 26, 2005
Posts: 50
Last: Jun 11, 2007
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 08:58 pm
nah, tht didnt work i still get the same error

anything else tht i could do ppl? im absolutly lost...
[confused]
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 09:08 pm
Damn,, hang m8, I will just check your script again

edit:-

main()
{
thread targ();
}
targ()
{
targ = getent("pistol1","targetname");
trig = getent ("pistol1trigger",targetname");
while(1)
trig waittill ("trigger");
targ movex (132,1,0,0);
targ waittill ("movedone");
wait (3);
targ movex (132,1,0,0);
targ waittill ("movedone");
}
}


Dont copy and paste this, try to copy exactly. Watch out for any typo's

edited on Jan. 22, 2006 04:23 pm by DadofAzz
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 09:30 pm
Damn,, I have spotted one already,,,

In the line trig = getent ("pistol1trigger",targetname");

You will see I have missed the "speech" marks in front of the targetname.

regards dadofazz
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 09:37 pm
damn and double damn,, there is another....

Soory m8 I am a bit wrecked

here we go

After the line while (1)

you need another brace like this {
Share |
KilLjoY
General Member
Since: Jul 13, 2004
Posts: 609
Last: Jan 24, 2009
[view latest posts]
Level 6
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 10:26 pm
jsut a question why do you need to typ the entire script and why can't you jsut copy it ??
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 10:30 pm
Hi m8, copy and paste can go wrong and it would have done here because it would have copied my typo's

You could try it tho
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 10:30 pm
Copying a script can 'miss out' parts, as a script is very precise is simply will not work if a part is missing, therefore typing it out can save this hassle!
Share |
DadofAzz
General Member
Since: May 24, 2005
Posts: 1233
Last: Oct 17, 2009
[view latest posts]
Level 8
MODSCON
Category: CoDUO Mapping
Posted: Sunday, Jan. 22, 2006 10:32 pm
Thanks rassy,,, [rocking]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO 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

»