1) You didn't make the ent correctly in radiant/didnt give it the correct targetname 2) You didn't specify the correct targetname in your script 3) You forgot to call your level_switch_tesla() function from somewhere.
Well, i used this for the targetname, as i should have.
So the only option is calling the function... I included the file in the map's .gsc file and added the level_switch_tesla under the _preload as you do with any other script...
Do i need to make a main() or init() function and then call the functions from there or no?
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
So the only option is calling the function... I included the file in the map's .gsc file and added the level_switch_tesla under the _preload as you do with any other script...
Do i need to make a main() or init() function and then call the functions from there or no?
You forgot checking to see if the ent was created correctly in Radiant - this includes making sure its actually a trigger_use brush and making sure you recompiled your map afterward.
For calling the function, main and init are just programming practice and by no means required to do anything in script.
Add an iPrintLn() somewhere in your script which will appear when you do something. That will tell you whether or not the script is being called. Don't put the iPrintLn() somewhere where it would get called before you spawn, otherwise obviously you won't see it.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
You could try writing a scriptmenu that has a level change command in the onOpen{} of itself. That way when you open the menu on the host in the game it loads the next level. Get the level command from the pc_gamelobby menu.
This is starting to really make me a bit angry, i've tried everything with no luck for the trigger. I'm going to post the function,mapname.gsc,a radiant pic of the KVP's
MAPNAME.gsc
Code Snippet
Plaintext
/* Der Frost / Nazi Zombie Sniperbolt Tutorial Version 2.0 Scripter: Sparks Tutorial: Sniperbolt
Version 1.0 (9/24/2009 7:51:18 PM) -- Initial Release Of Source Files */
main() { level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
// Must Change These To Your Maps level.DLC3.createArt = maps\createart\Intel_art::main; level.DLC3.createFX = maps\createfx\Intel_fx::main; // level.DLC3.myFX = ::preCacheMyFX;
/*-------------------- FX ----------------------*/ DLC3_FX();
/*-------------------- FUNCTION CALLS - POST _Load ----------------------*/ level.zone_manager_init_func = ::dlc3_zone_init; level thread DLC3_threadCalls2(); initammobox(); level_switch_tesla(); }
dlc3_zone_init() {
add_adjacent_zone( "initial_zone", "sw", "sw" ); add_adjacent_zone( "zone1", "zone2", "enter_zone2" ); /* ============= ///ScriptDocBegin "Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )" "Summary: Sets up adjacent zones." "MandatoryArg: <zone_1>: Name of first Info_Volume" "MandatoryArg: <zone_2>: Name of second Info_Volume" "MandatoryArg: <flag>: Flag to be set to initiate zones" "OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false." "Example: add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );" ///ScriptDocEnd ============= */
// Outside East Door //add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" ); }
no reason for your sethintstring to look like this:
Code Snippet
Plaintext
sethintstring(&"Press &&1 to Play Telsa [Cost: 1]");
I don't know if it will actually fix anything but there is no reason for it to be there, this is fine:
Code Snippet
Plaintext
sethintstring("Press &&1 to Play Telsa [Cost: 1]");
I'm guessing that's the character to tell if you want the string literal, which in this case you don't want. I know in C# it uses @, but in COD that symbolizes the string is defined somewhere else such as an STR file.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
no reason for your sethintstring to look like this:
Code Snippet
Plaintext
sethintstring(&"Press &&1 to Play Telsa [Cost: 1]");
I don't know if it will actually fix anything but there is no reason for it to be there, this is fine:
Code Snippet
Plaintext
sethintstring("Press &&1 to Play Telsa [Cost: 1]");
I'm guessing that's the character to tell if you want the string literal, which in this case you don't want. I know in C# it uses @, but in COD that symbolizes the string is defined somewhere else such as an STR file.
No, because the trigger isn't working and i have it set to show after i use the hintstring
If it helps any, i tried also calling the script from _zombiemode and it resulted in the game resetting the "zombiemode" dvar, so the game thought i was playing campaign or something, and the trigger didn't even show up...
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
No, because the trigger isn't working and i have it set to show after i use the hintstring
If it helps any, i tried also calling the script from _zombiemode and it resulted in the game resetting the "zombiemode" dvar, so the game thought i was playing campaign or something, and the trigger didn't even show up...
You're making this harder than it needs to be for yourself.
The problem is your initammobox() calll in your mapname.gsc. You didn't thread it, which pauses code execution. Thread that call and your level_switch_tesla call - then everything will be fixed.
In response to your testing, put the iPrintLn() somewhere in the script BEFORE the part that doesn't work. Obviously if your trigger isnt working then you will never see the code get to that block... which makes the test completely useless.
Putting '&' before a string denotes that what follows is a localizedstring defined in a .str file. If you try to set a hintstring to a nonexistant localizedstring like you were doing in the above code example, it will just be blank. It won't break your trigger or cause the hand to show, and it's not the source of your problem at the moment.
You're making this harder than it needs to be for yourself.
The problem is your initammobox() calll in your mapname.gsc. You didn't thread it, which pauses code execution. Thread that call and your level_switch_tesla call - then everything will be fixed.
In response to your testing, put the iPrintLn() somewhere in the script BEFORE the part that doesn't work. Obviously if your trigger isnt working then you will never see the code get to that block... which makes the test completely useless.
Putting '&' before a string denotes that what follows is a localizedstring defined in a .str file. If you try to set a hintstring to a nonexistant localizedstring like you were doing in the above code example, it will just be blank. It won't break your trigger or cause the hand to show, and it's not the source of your problem at the moment.
that helped a lot.
though i'm getting weird side affects with the game thinking the second map is a campaign mission instead of a zombiemode, in other words, zombies don't spawn and campaign assets are loaded into the game, even though the map works just fine by itself.
Last Edit: November 05, 2013, 07:25:37 am by daedra descent
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
that helped a lot. the game thinks the second map is a campaign mission instead of a zombiemode, in other words, zombies don't spawn and campaign assets are loaded into the game, even though the map works just fine by itself.
I'm sure i just need to re-set the dvar, but how?
Does your second map have a nazi_zombie_ prefix?
If so then I would guess the second level needs _load called on it again to call all the spawning and zombiemode.
Before bothering I would make sure the level switch works in coop.