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

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Lift Script not working
Reathan
General Member
Since: May 28, 2013
Posts: 5
Last: May 29, 2013
[view latest posts]
Level 0
Category: CoD4 MP Mapping
Posted: Tuesday, May. 28, 2013 06:23 pm
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.
Share |
BlindSniper
General Member
Since: Aug 22, 2008
Posts: 45
Last: May 29, 2013
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, May. 28, 2013 09:47 pm
Quote:
******* 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);


It appears to be defined in the script you've shown, so check that you have defined it in radiant. So you need a script_brushmodel with lift1_up set as the targetname.

Share |
Reathan
General Member
Since: May 28, 2013
Posts: 5
Last: May 29, 2013
[view latest posts]
Level 0
Category: CoD4 MP Mapping
Posted: Tuesday, May. 28, 2013 11:44 pm
Entity:
Key: classname Value: trigger_use_touch
Key: cursorhint Value: HINT_ACTIVATE
Key: target Value : lift1_up
Key: targetname Value: lift1_up_trigger

As for all the script_brushmodel

Entity:
Key: classname Value: script_brushmodel
Key: target name Value: wall1_up
Key: target Value: lift1_up_trigger

Share |
BlindSniper
General Member
Since: Aug 22, 2008
Posts: 45
Last: May 29, 2013
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Wednesday, May. 29, 2013 02:06 pm
So in radiant your lift part has the targetname of wall1_up. The script is looking for a lift1_up, so change it to that. See if that works
Share |
Reathan
General Member
Since: May 28, 2013
Posts: 5
Last: May 29, 2013
[view latest posts]
Level 0
Category: CoD4 MP Mapping
Posted: Wednesday, May. 29, 2013 06:07 pm
Well, I switched wall1_up to lift1_up. Didn't work. I switched target name lift1_up to lift1_up_trigger, and target lift1_up to lift1_up_trigger on 2 different loads of the map. None of these worked. I'm getting really frustrated with this. I did everything the tut said and still no lift. :/ Is it possible that if I tried to script more than 1 brush_model to a single trigger that it wouldn't work? I made an elevator looking lift with multiple brushes. Do I have to only have one brush scripted to the trigger?
Share |
Reathan
General Member
Since: May 28, 2013
Posts: 5
Last: May 29, 2013
[view latest posts]
Level 0
Category: CoD4 MP Mapping
Posted: Wednesday, May. 29, 2013 06:12 pm
*Update*
I changed it to exactly what I had it the first time WITHOUT enable developer on, instead of getting the script runtime error, the lift just won't move. I press use when the hint comes up and no movement or anything whatsoever. I'll do some tweaking to see if I can figure things out.
Share |
Reathan
General Member
Since: May 28, 2013
Posts: 5
Last: May 29, 2013
[view latest posts]
Level 0
Category: CoD4 MP Mapping
Posted: Wednesday, May. 29, 2013 06:27 pm
*Update*
I ran the game WITH and WITHOUT developer after making changes. WITH developer, I get the same error as always, WITHOUT, no error but the lift still doesn't work.
Share |
BlindSniper
General Member
Since: Aug 22, 2008
Posts: 45
Last: May 29, 2013
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Wednesday, May. 29, 2013 07:17 pm
Reathan writes...
Quote:
Is it possible that if I tried to script more than 1 brush_model to a single trigger that it wouldn't work? I made an elevator looking lift with multiple brushes. Do I have to only have one brush scripted to the trigger?


If you have multiple separate entities with the same targetname then getent wouldn't work as it is for only one entity.

If you select all the brushes at the same time and turn them into a script_brushmodel then it would identify as one entity. To check it works changing the targetname for one brush will change it for all the brushes of that entity.

Do you understand that? I probably didn't explain it particularly clearly.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP 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

»