Alright guys, I know this is a relatively simple script but I'm having trouble getting it to work properly. I just need to know what's wrong and how to fix it, and any help will be most appreciated!
As soon as I use my lift, or try to, I get this error
Script Runtime Error (see console for details) Undefined is not an entity
The errors I read in console are as follows:
ERROR: Could not load rawfile "maps/createfx/mp_Office_Building_fx.gsc"
ERROR: File not found: maps/createfx/mp_Office_Building_fx.gsc
******* script runtime error *******
undefined is not a field object: (file 'maps/mp/gametypes/_globallogic.gsc', line 1013)
ERROR: Called from:
(file 'maps/mp/gametypes/_globallogic.gsc', line 882)
[[level.onSpawnSpectator]] ( origin, angles );
ERROR: Called from:
(file 'maps/mp/gametypes/_globallogic.gsc', line 849)
in_spawnSpectator ( origin, angles );
ERROR: Called from:
(file 'maps/mp/gametypes/_globallogic.gsc', line 4152)
[[level.spawnSpectator]] ();
ERROR: Called from:
(file 'maps/mp/gametypes/_callbacksetup.gsc', line 38)
[[level.callbackplayerConnect]] ();
ERROR: Called from:
(file 'maps/mp/gametypes/_globallogic.gsc', line 3972)
waittillframeend;
ERROR: ****************************************
Those errors repeat 3 times in console, after such these errors follow:
ERROR: Could not load rawfile "vision/mp_Office_Building.vision".
ERROR: Couldn't open 'vision/mp_Office_Building.vision'.
******* script runtime error *******
undefined is not an entity: (file 'maps/mp/mp_Office_Building_lift1_activate.gsc', line 32)
lift1_up movex (618,3,1,1);
ERROR: Started from:
(file 'maps/mp/mp_Office_Building_lift1_activate.gsc', line 27)
lift1_up_trigger waittill ("trigger");
ERROR: ****************************************
Could not find menu 'main'
Could not find menu 'main'
******* script runtime error *******
undefined is not an entity: (file 'maps/mp/mp_Office_Building_lift1_activate.gsc', line 40)
lift1_up movex (-618,3,1,1);
*
ERROR: Started from:
(file 'maps/mp/mp_Office_Building_lift1_activate.gsc', line 36)
wait (5) ;
*
And that's every error I get from my map in console. The GSC file for my map is below
GSC file
main()
{
maps\mp\_load::main();
// this line sends the game into the other file called 'mp_Office_Building_wall1_activate.gsc'
// when 'wall1_up_trigger' is pressed and then runs the lines in that file
maps\mp\mp_Office_Building_lift1_activate::main();
// This creates a fairly dense fog which is generally grey and miserable.
setExpFog(300, 1200, 0.34, 0.36, 0.36, 0);
game["allies"] = "sas";
game["axis"] = "russian";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";
setdvar( "r_specularcolorscale", "5" );
setdvar("compassmaxrange","2000");
}
The Lift Script File, which I got from this sites lift tut, is below. I did change the movez to movex because the info in the file stated for up and down movement, x was the correct variable. If I've made ANY mistake, please correct me. I just want to get this map working!
GSC Lift Script File
main()
{
thread player_mp_Office_Building_lift1_activate();
}
player_mp_Office_Building_lift1_activate()
{
// this line tells the game that there is an entity in the map called ' lift1_up '
lift1_up=getent("lift1_up","targetname");
// this line tells the game that there is an entity in the game called ' lift1_up_trigger '
lift1_up_trigger=getent("lift1_up_trigger","targetname");
while(1)
{
// this line says ' wait until the trigger is pressed ' and then execute the code below
lift1_up_trigger waittill ("trigger");
// this line says, when the trigger is pressed, move ' lift1_up ' 40 units
lift1_up movex (618,3,1,1);
// thie line says ' pause ' for 5 seconds
wait(5);
// this line says, when the trigger is pressed, move ' lift1_up ' - 40 units
lift1_up movex (-618,3,1,1);
// pause again for 5 seconds
wait(5);
}
}
// other commands are ' movey and movez '
// using movey - moves the object left and right
// using movex - moves the object up and down
// using movez - moves the object diagonally
// not sure which moves which, but youll see once youve run the game
If you guys need me to load my globallogic.gsc file, I will, but just as a heads up, the thing is quite a read.
|