| Author |
Topic: What went wrong? |
|
|
Category: CoD4 SP Mapping Posted: Thursday, Aug. 30, 2012 08:14 am |
 |
I have followed this tutorial step by step .
http://modsonline.com/Tutorials-read-658.html
and when i compile my ff it says that "rawfile,mapsmp_utility.gsc"
is missing and when i put it in the rawfile it says in the ff compile that could not open it ![[confused]](images/BBCode/smilies/confused.gif)
help ( my map is sp )
This is not urgent but i could use some help. Id like your help in that forum http://modsonline.com/Forums-top-163335.html rather than this one right now.
|
 |
|
|
| Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
|
Category: CoD4 SP Mapping Posted: Thursday, Aug. 30, 2012 08:55 am |
 |
SPi writes...Quote:
In the tutorial, there is a syntax (spelling) error:
The tutorial has this:
Code: self mapsmp_utility::triggerOn();
When it should be this:
Code: self maps/mp/_utility::triggerOn(); //<--- note the slash "/" after each folder
|
 |
|
|
|
|
|
|
|
Category: CoD4 SP Mapping Posted: Thursday, Aug. 30, 2012 01:22 pm |
 |
is this right becouse i get bad syntax in one of these lines we talked about
Code: main()
{
thread player_closing_doors();
}
player_closing_doors()
{
doors = getentarray("door_trig1","targetname");
for(i=0; i<doors.size; i++)
{
doors[i] thread door_think();
}
}
door_think()
{
self.doormoving = false;
self.doorclosed = true;
self.doormodel = getent(self.target, "targetname");
while(1)
{
self waittill("trigger");
if(!self.doormoving)
{
self thread door_move();
}
}
}
door_move()
{
self.doormoving = true;
if(self.doorclosed)
{
self maps/mp/_utility::triggerOff();
self.doormodel playsound("metal_open");
self.doormodel rotateyaw(self.count, 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
self maps/mp/_utility::triggerOn();
self.doorclosed = false;
}
else
{
self maps/mp/_utility::triggerOff();
self.doormodel playsound("metal_close");
self.doormodel rotateyaw((self.count * -1), 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
self maps/mp/_utility::triggerOn();
self.doorclosed = true;
}
self.doormoving = false;
}
|
 |
|
|
| Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
|
Category: CoD4 SP Mapping Posted: Thursday, Aug. 30, 2012 01:51 pm |
 |
try this - I copied the functions from maps\mp\_utility.gsc to the foot of the code:
Code: main()
{
thread player_closing_doors();
}
player_closing_doors()
{
doors = getentarray("door_trig1","targetname");
for(i=0; i<doors.size; i++)
{
doors[i] thread door_think();
}
}
door_think()
{
self.doormoving = false;
self.doorclosed = true;
self.doormodel = getent(self.target, "targetname");
while(1)
{
self waittill("trigger");
if(!self.doormoving)
{
self thread door_move();
}
}
}
door_move()
{
self.doormoving = true;
if(self.doorclosed)
{
self triggerOff();
self.doormodel playsound("metal_open");
self.doormodel rotateyaw(self.count, 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
self triggerOn();
self.doorclosed = false;
}
else
{
self triggerOff();
self.doormodel playsound("metal_close");
self.doormodel rotateyaw((self.count * -1), 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
self triggerOn();
self.doorclosed = true;
}
self.doormoving = false;
}
triggerOff()
{
if (!isdefined (self.realOrigin))
self.realOrigin = self.origin;
if (self.origin == self.realorigin)
self.origin += (0, 0, -10000);
}
triggerOn()
{
if (isDefined (self.realOrigin) )
self.origin = self.realOrigin;
}
|
 |
|
|
|
|
Category: CoD4 SP Mapping Posted: Friday, Aug. 31, 2012 02:56 am |
 |
|
 |
|
|
|
|
|
|
|
|
|
|
FactoryCall of Duty 2: Maps: Multiplayer (12.42Mb)
TrenchesCall of Duty 2: Maps: Multiplayer (8.44Mb)
The MarshCall of Duty 2: Maps: Multiplayer (4.78Mb)
ScrapyardCall of Duty 2: Maps: Multiplayer (2.62Mb)
|