Will this work?

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Will this work?

Post by Lawless » April 19th, 2011, 5:33 pm

Well as some of you may know, I have a problem with my scripts and it is because CoD4 is not loading my scripts altogether.
So my question is, Will reinstalling CoD4 help in any way towards my script problem?
And also if I reinstall CoD4, Would I be able to keep my profiles that contain my ranks on the CoDJumper servers?
Join my server @ 217.163.22.223:28960

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Re: Will this work?

Post by Lawless » April 19th, 2011, 6:00 pm

KillerSam wrote:
Lawless wrote:Well as some of you may know, I have a problem with my scripts and it is because CoD4 is not loading my scripts altogether.
So my question is, Will reinstalling CoD4 help in any way towards my script problem?
And also if I reinstall CoD4, Would I be able to keep my profiles that contain my ranks on the CoDJumper servers?
1) POSSIBLY
2) Likely to be lost, but you can keep your configs.
Ok thanks I'm gonna try this now.
Join my server @ 217.163.22.223:28960

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: Will this work?

Post by Moustache » April 19th, 2011, 6:37 pm

KillerSam wrote:2) Likely to be lost, but you can keep your configs.
Isn't it possible to backup your mpdata?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Will this work?

Post by Rezil » April 19th, 2011, 6:40 pm

1.) Your code not working has nothing to do with the CoD4 install, so reinstalling it will not fix your problem.
2.) You can back up your profiles along with your rank.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Re: Will this work?

Post by Lawless » April 19th, 2011, 7:39 pm

Rezil wrote:1.) Your code not working has nothing to do with the CoD4 install, so reinstalling it will not fix your problem.
2.) You can back up your profiles along with your rank.
Well it didnt work but I thought that something in CoD4 wasnt reading my scripts because theres no errors in the compiling process.
I did back up my profile and I have it has the same ranking on all servers.
Join my server @ 217.163.22.223:28960

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Will this work?

Post by Rezil » April 19th, 2011, 8:20 pm

The code is not checked at compile. Only after you run the map is the script checked so you either don't link the code properly(the easiest way would be to have a .gsc the same name as your map, or you could link inside that .gsc to other .gsc's - hope that makes sense) or you don't have a main .gsc.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Re: Will this work?

Post by Lawless » April 19th, 2011, 8:38 pm

Rezil wrote:The code is not checked at compile. Only after you run the map is the script checked so you either don't link the code properly(the easiest way would be to have a .gsc the same name as your map, or you could link inside that .gsc to other .gsc's - hope that makes sense) or you don't have a main .gsc.
Nahh KS already explaind it, he added text to the start of the main .gsc, [mp_lawless_v2.gsc], and it didnt appear.
Its not my script thats not working because KS checked it and added the text.
Join my server @ 217.163.22.223:28960

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Will this work?

Post by Drofder2004 » April 19th, 2011, 9:43 pm

Lawless wrote:
Rezil wrote:The code is not checked at compile. Only after you run the map is the script checked so you either don't link the code properly(the easiest way would be to have a .gsc the same name as your map, or you could link inside that .gsc to other .gsc's - hope that makes sense) or you don't have a main .gsc.
Nahh KS already explaind it, he added text to the start of the main .gsc, [mp_lawless_v2.gsc], and it didnt appear.
Its not my script thats not working because KS checked it and added the text.
:lol:
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Re: Will this work?

Post by Lawless » April 19th, 2011, 10:56 pm

KillerSam wrote:
Lawless wrote:
Rezil wrote:The code is not checked at compile. Only after you run the map is the script checked so you either don't link the code properly(the easiest way would be to have a .gsc the same name as your map, or you could link inside that .gsc to other .gsc's - hope that makes sense) or you don't have a main .gsc.
Nahh KS already explaind it, he added text to the start of the main .gsc, [mp_lawless_v2.gsc], and it didnt appear.
Its not my script thats not working because KS checked it and added the text.
Justified laugh - I never ruled your script out, I simply showed you how to debug it with iprint / dvar changes.
Well the text didnt work, what does this mean, if it is the script thats the problem whats wrong with it?
Join my server @ 217.163.22.223:28960

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Will this work?

Post by Drofder2004 » April 20th, 2011, 9:12 pm

Lawless wrote:Well the text didnt work, what does this mean, if it is the script thats the problem whats wrong with it?
Post it, there are at least 4 active advanced scripters on this forum.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Lawless
CJ Fan
CJ Fan
Posts: 110
Joined: January 25th, 2011, 7:11 pm
Gamertag: x STRAF3Zz v2

Re: Will this work?

Post by Lawless » April 22nd, 2011, 11:39 pm

Drofder2004 wrote:
Lawless wrote:Well the text didnt work, what does this mean, if it is the script thats the problem whats wrong with it?
Post it, there are at least 4 active advanced scripters on this forum.

Code: Select all

main()
{
	thread self_closing_doors();
}
self_closing_doors()
{
	doors = getentarray("bounce_trig","targetname");
	for(i=0; i<doors.size; i++)
	{
		doors[i] thread door_think();
	}
}
door_think()
{
   self.doormoving = false;
   self.doormodel = getent(self.target, "targetname");

   while(1)
   {
      self waittill("trigger");
      if(!self.doormoving)
      {   
         self thread door_move();
      }
   }
}
door_move()
{
	self maps\mp\_utility::triggerOff();
	self.doormoving = true;
	self.doormodel rotateyaw(self.count, 2, 0.5, 0.5);
	self.doormodel waittill("rotatedone");
	wait (60);
	self.doormodel rotateyaw((self.count * -1), 2, 0.5, 0.5);
	self.doormodel waittill("rotatedone");
	self maps\mp\_utility::triggerOn();
	self.doormoving = false;
}
Join my server @ 217.163.22.223:28960

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Will this work?

Post by megazor » April 23rd, 2011, 3:15 am

try this and tell us what it says

Code: Select all

main()
{
   	thread self_closing_doors();
}

self_closing_doors()
{
   	doors = getentarray("bounce_trig", "targetname");
   	for(i = 0; i < doors.size; i++)
      		doors[i] thread door_think();
}

door_think()
{
   	self.doormoving = false;
   	self.doormodel = getent(self.target, "targetname");
   	if (isDefined(self.doormodel))
		iprintln("model defined");

   	while(1)
   	{
      		self waittill("trigger");
      		if(!self.doormoving)
         		self thread door_move();
   	}
}

door_move()
{
  	self maps\mp\_utility::triggerOff();
   	self.doormoving = true;
  	if (isDefined(self.count))
		iprintln("rotating");
   	self.doormodel rotateyaw(self.count, 2, .5, .5);
   	self.doormodel waittill("rotatedone");
   	wait 60;
   	self.doormodel rotateyaw((self.count * -1), 2, .5, .5);
   	self.doormodel waittill("rotatedone");
   	self maps\mp\_utility::triggerOn();
   	self.doormoving = false;
}

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Will this work?

Post by Drofder2004 » April 23rd, 2011, 3:52 pm

Where is "self.count" defined?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Will this work?

Post by megazor » April 23rd, 2011, 4:50 pm

he said it was defined in radiant:

key = count
value = 90

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Will this work?

Post by Drofder2004 » April 23rd, 2011, 7:22 pm

megazor wrote:he said it was defined in radiant:

key = count
value = 90
Didn't see that.

for the sake of testing, I would enter a value in the script and NOT in radiant.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests