UGX-Mods

Call of Duty 5: World at War => Custom Maps, Mods & Tools => Applications & Tools => Topic started by: Aidan on August 21, 2012, 01:23:56 am

Title: [App] UGX Script Placer v1.1.6
Post by: Aidan on August 21, 2012, 01:23:56 am
This software is now deprecated, you can now download the UGX Script Placer 2.0. (http://ugx-mods.com/forum/index.php?topic=4221)

Some people requested UGX to make a Script Placer.
:accepted:
So guess what. UGX made a Script Placer.

Virus Scans: [You are not allowed to view external links.
Register or Login to see them] This requires  .NET Framework 4.0 (http://www.microsoft.com/en-us/download/details.aspx?id=17851) (because I'm still using C# *sigh*), which you should probably have anyways. Don't expect this program to work correctly because nothing I make works correctly once its outside of my computer.  :)

I took it out of another project that I was working on that will never be finished because it's stupid. Fixed some stuff, added some stuff, and now it's done. Note: There are a few features that are always grayed out and you cant use them. Those are options that will default your map with a script such as Easy-Fx or Weather. The reason I can't make these work is because my CoD Root Folder is currently screwed up and I don't know why, so I can't test CoD Scripts. Anyways....

Some things I should point out before you use the program: Some options will need to replace existing files in your Root Folder to work. Those options are not required though. Any files that the Script Placer needs to overwrite, it WILL ASK YOU what it should do. Don't just spam "Yes" to any dialog box that comes up.

The Script Placer comes with a feature called "Map Remover" which helps you remove unwanted maps or files. It searches your root for files with specific names or contents based on the name of the map you are searching for. This is better than just regularly using the search bar in your root because it will only check common areas for files. That means it wont check places like raw\xmodels, which takes a while, for scripts, because they won't (shouldn't) ever be there.

The "Display Name" of the map is what is used in the main menus that the player of the map will see. So instead of seeing "Launch nazi_zombie_awesome", they might see "Launch Zombie Awesome". And other things like that.

Expect updates at some point or another. This program doesn't have an auto-update feature (because I'm lazy), so you'll have to download it again if you want the update.



Changelog:
1.1.6:
- Removed placement of "sound,character,nazi_zombie_factory,all_sp" in mapname.csv which was causing a 1600 sounds error when trying to use a generated map with UGX Mod v1.0.x. This line has been added to dlc3.csv in the latest update to the UGX Modtools Patch (v1.0.6) which can be downloaded from the UGX Wiki. The UGX Mod Standalone dlc3.csv will overwrite the Modtools Patch dlc3.csv, eliminating the possibility for the character sounds to be included.

1.1.5:
- Fixed incorrect statement in _loadout.gsc

1.1.4:
- Fixed some DLC3 sounds not being included in created maps

1.1.3:
- Fixed loadout.gsc issues based on map prefix
- Fixed file name replacement in launcher files
- Lowered FX usage by removing unused weapons

1.1:
 - I made an update to this program to allow for selecting a custom root. Just click "Use Custom Game Path..." in the options menu. Select "Use Default Game Path" to use the default root. This program doesn't auto-update, so you will need to download it again. Its just one .exe though :)

1.0:
 - Initial Release
Title: Re: [App] UGX Script Placer
Post by: KDXDARK on August 29, 2012, 02:24:29 pm
new version with the option for the defeault game path?
Title: Re: [App] UGX Script Placer
Post by: Aidan on August 29, 2012, 09:48:57 pm
new version with the option for the defeault game path?

Sorry, I forgot. I just updated the program to allow that.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: KDXDARK on August 29, 2012, 10:03:30 pm
work very good, good job!!! :D :D :D
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Aidan on August 29, 2012, 10:23:07 pm
work very good, good job!!! :D :D :D

:)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: nickst98 on August 30, 2012, 12:38:17 am
you should add a main menu screen option.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Aidan on August 30, 2012, 01:05:01 am
you should add a main menu screen option.

That is a possibility. I'll see what I can do (though I'm going to need some help from Treminaor to do that :P)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: knzombiemaster on August 30, 2012, 09:13:07 am
good work one question fot the weapons datas there are in DLc_weapons or so in you mod folder how i can change weapons ??
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on August 30, 2012, 10:10:36 am
That is a possibility. I'll see what I can do (though I'm going to need some help from Treminaor to do that :P)
hey aidan you should make it so you can add some stuff later but still use the script placer to make the map. Because i assume people dont want to disable console right from start if they need to just. Just saying though. The script placer is awesome :D
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Aidan on August 30, 2012, 09:08:54 pm
good work one question fot the weapons datas there are in DLc_weapons or so in you mod folder how i can change weapons ??

You open DLC3_Weapons.iwd using WinRar. If you don't know how to do that already, you'd better learn quickly if you want to be a mapper or modder because you'll have to use WinRar a lot.

hey aidan you should make it so you can add some stuff later but still use the script placer to make the map. Because i assume people dont want to disable console right from start if they need to just. Just saying though. The script placer is awesome :D

I can't do that, because a script placer doesn't really know what you have changed since when it was created. It could compare files, I guess, but that probably wouldn't work well. Adding something later on would be better for a tutorial, which I already made a tutorial for removing console. I also made on on screens, but I never finished the one for Menu screen (it's really simple, just make the file name of the image be 'menu_map_<yourmapname>' and then add that material to your map's zone_source). As for the cheat prevention options that I haven't added yet, those will just be GSC's, so you can comment those out easily while your testing.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: knzombiemaster on August 31, 2012, 03:01:29 pm
You open DLC3_Weapons.iwd using WinRar. If you don't know how to do that already, you'd better learn quickly if you want to be a mapper or modder because you'll have to use WinRar a lot.

I can't do that, because a script placer doesn't really know what you have changed since when it was created. It could compare files, I guess, but that probably wouldn't work well. Adding something later on would be better for a tutorial, which I already made a tutorial for removing console. I also made on on screens, but I never finished the one for Menu screen (it's really simple, just make the file name of the image be 'menu_map_<yourmapname>' and then add that material to your map's zone_source). As for the cheat prevention options that I haven't added yet, those will just be GSC's, so you can comment those out easily while your testing.

yes i check it now i know al about winnrar and i use 7 zip ;)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on August 31, 2012, 06:11:09 pm
yes i check it now i know al about winnrar and i use 7 zip ;)
I don't think 7zip can open an archive without extracting it. WinRAR can preview archives without extracting them, and you can inject files into the archives without extraction.

If 7zip can do that too then by all means continue using 7zip.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: knzombiemaster on August 31, 2012, 06:41:39 pm
I don't think 7zip can open an archive without extracting it. WinRAR can preview archives without extracting them, and you can inject files into the archives without extraction.

If 7zip can do that too then by all means continue using 7zip.

yes 7 zip do this and i usually used this so i dont know that i can use winrar :D
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 10, 2012, 06:05:54 pm
been gone for a while but...

the UGX script placer gives me a custom_layout error. not even sure what it is, but i don't get the error wth hankey's so until i can fix it, ill use hankey's...

something about a maps/custom_layout request or w/e. in the zombiemode.gsc.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on September 10, 2012, 11:18:02 pm
been gone for a while but...

the UGX script placer gives me a custom_layout error. not even sure what it is, but i don't get the error wth hankey's so until i can fix it, ill use hankey's...

something about a maps/custom_layout request or w/e. in the zombiemode.gsc.
isnt the custom_layout code by nipawesome(or whatever his name is). its not a problem with the script placer.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 11, 2012, 12:12:10 am
Don't blame our program for your fucked root folder... make sure your installation is clean.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 12, 2012, 06:08:22 pm
Don't blame our program for your fucked root folder... make sure your installation is clean.

Chill, i wasn't really saying anything bad, for all i know it might be my Mod tools, but as i said, hankeys never gave me much trouble that i couldn't fix or do by myself.

REEDIT, who removed my profile picture :/

Title: Re: [App] UGX Script Placer [v1.1]
Post by: cinnober on September 12, 2012, 06:25:53 pm
Have tried this and here?s som info/ ideas:

1. It runs fine on Win XP 32bit and using Steam version also :)
2. Add the _zombiemode.gsc to the mods/map folder with start points of 500000 ;)
3. Would be nice to remove the triple "ERROR: sound alias file weapons.csv: duplicate alias 'rpg_impact_boom'" error. I know it can be ignored but all noobs don?t know that ;)
4. I?ve tried create scripts with Loadscreen,Missionscreen & Pausescreen checked and have created 3 picture in .targa format in raw/images folder. But there?s a error saying it can?t convert the images or don?t have permission to move files  ???

5. I?ve also tried checked the "Create Main Menu Launch Button" but no launch button is created (have said YES to backup overwritten files) ???

Otherwise good work and hopes for some updates /progress in this. 8)

It could turn out good ;)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: deathclonic on September 12, 2012, 08:40:26 pm
Have tried this and here?s som info/ ideas:

1. It runs fine on Win XP 32bit and using Steam version also :)
2. Add the _zombiemode.gsc to the mods/map folder with start points of 500000 ;)
3. Would be nice to remove the triple "ERROR: sound alias file weapons.csv: duplicate alias 'rpg_impact_boom'" error. I know it can be ignored but all noobs don?t know that ;)
4. I?ve tried create scripts with Loadscreen,Missionscreen & Pausescreen checked and have created 3 picture in .targa format in raw/images folder. But there?s a error saying it can?t convert the images or don?t have permission to move files  ???

5. I?ve also tried checked the "Create Main Menu Launch Button" but no launch button is created (have said YES to backup overwritten files) ???

Otherwise good work and hopes for some updates /progress in this. 8)

It could turn out good ;)

Add menufile,ui/main.menu in your mod.csv
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 12, 2012, 10:43:34 pm
Chill, i wasn't really saying anything bad, for all i know it might be my Mod tools, but as i said, hankeys never gave me much trouble that i couldn't fix or do by myself.

REEDIT, who removed my profile picture :/
No one removed your profile picture. Upload it to a more reliable domain next time - the link probably expired.

I'm perfectly chill, I'm just tired of you posting these useless posts about how the program doesn't work when you know it's your fault that it doesn't work. It's called spam.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Aidan on September 12, 2012, 10:59:51 pm
Have tried this and here?s som info/ ideas:

1. It runs fine on Win XP 32bit and using Steam version also :)
2. Add the _zombiemode.gsc to the mods/map folder with start points of 500000 ;)
3. Would be nice to remove the triple "ERROR: sound alias file weapons.csv: duplicate alias 'rpg_impact_boom'" error. I know it can be ignored but all noobs don?t know that ;)
4. I?ve tried create scripts with Loadscreen,Missionscreen & Pausescreen checked and have created 3 picture in .targa format in raw/images folder. But there?s a error saying it can?t convert the images or don?t have permission to move files  ???

5. I?ve also tried checked the "Create Main Menu Launch Button" but no launch button is created (have said YES to backup overwritten files) ???

Otherwise good work and hopes for some updates /progress in this. 8)

It could turn out good ;)

1. Awesome :)

2. I'll do it if I remember, but then again, not having that is a good "first tutorial" to new scripters, so they can learn how to do it themselves. Or something like that....

3. I thought that was a problem with my soundaliases, not the map  :o I don't know why that happens. I'll look into it.

4. Try DDS (I never tested with targa, but it should be the same thing). Permissions (as it says) might be it too, try running the program as administrator, or making sure your root folder and all sub folders are not Read-Only. The process for converting images is a confusing one, because of how I had to use CoD's "converter.exe". They didn't provide support for passing it information directly, so I had to make it create a file, and then run converter with the path of the file, and then once it's done, delete the file. There are a lot of places there where it could go wrong :(

5. I've had some other people say that too. I think I made it check for this, but make sure your not running Launcher while using the script placer. Launcher wont allow you to modify mod.csv while it's runnning if that mod is selected in the Mod Builder section. If that doesn't work, you can do it manually the way DeathClonic said and add

ui/main.menu

to your mod.csv (and compile the mod, of course).
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 14, 2012, 01:22:25 pm
intro text of tutorial map by sniperbolt?

fixed the map crashing error, get the weird intro text with a blank map though.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: TheNiceUb3r on September 25, 2012, 05:10:04 pm
It would be really nice if you had a already mapped option
and a stand alone menu maker thing
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 25, 2012, 06:00:38 pm
It would be really nice if you had a already mapped option
and a stand alone menu maker thing
It should already be able to tell if you've created the map file already. Just name it correctly and tell it not to create a map file for you
Title: Re: [App] UGX Script Placer [v1.1]
Post by: TheNiceUb3r on September 25, 2012, 06:15:43 pm
I cant seem to get the custom menu screens to work :(
The launch now button does but not the menu screens
Title: Re: [App] UGX Script Placer [v1.1]
Post by: TheNiceUb3r on September 25, 2012, 11:52:25 pm
Can it be fixed please cuz if it where to work would be the most boss feature ever
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 26, 2012, 05:59:24 pm
LOL
 can't you manually add the loadscreen?

oh and BTW, i'm not too good at math or anything, but isn't there a 32.5% chance that you miss click the "yes" button, effectivly overwriting your map?

maybe auto create a backup of the map file, even if you didn't choose to backup the file (if you overwrite it?).
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 26, 2012, 06:02:16 pm
LOL
 can't you manually add the loadscreen?

oh and BTW, i'm not too good at math or anything, but isn't there a 32.5% chance that you miss click the "yes" button, effectivly overwriting your map?

maybe auto create a backup of the map file, even if you didn't choose to backup the file (if you overwrite it?).
Lmao, you just earned a +1 respect from me.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 26, 2012, 06:39:05 pm
Lmao, you just earned a +1 respect from me.

i wonder why anyone would do that O.o
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 26, 2012, 07:49:58 pm
i wonder why anyone would do that O.o
I did have to second guess myself before I did it.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: daedra descent on September 27, 2012, 01:27:16 pm
I did have to second guess myself before I did it.

i was more hoping for a reason of giving me a respect/praise/karma... not so much for your comment  ;)

i wonder if you could make respect/karma/praise public for all to see on there profiles  :nyan:
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on September 27, 2012, 04:38:46 pm
i was more hoping for a reason of giving me a respect/praise/karma...
I think it was pretty self explanatory.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Mr.Chip on January 13, 2013, 11:58:30 pm
I just got this script placer, and try'd to start a new map with it, but it is taking forever to generate. i have all the screens selected to be made, and the option for it to create a menu start button selected, for sniperbolts tutorial. i left it sitting for about 24 hours and it still hasnt finished, i was wondering how long it should take or what i need to do to get it to work. hopefully someone can help thanks for taking the time to read this.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on January 14, 2013, 02:33:04 am
I just got this script placer, and try'd to start a new map with it, but it is taking forever to generate. i have all the screens selected to be made, and the option for it to create a menu start button selected, for sniperbolts tutorial. i left it sitting for about 24 hours and it still hasnt finished, i was wondering how long it should take or what i need to do to get it to work. hopefully someone can help thanks for taking the time to read this.
It should only take seconds. Are you running as administrator? Do you have a legal CoDWaW installation? Is CoDWaW installed properly or do you have CoDWaW installed outside of Program Files?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Mr.Chip on January 14, 2013, 04:26:24 am
I am running as administrator, should i apply it in properties or just right click and run as admin everytime? my waw is legal i purchased it on steam. the program files was on another drive because my brother installed it wrong after we restored our computer, but i moved it back into the c drive were it should be and re-downloaded the scriptplacer, then i tried it again but forgot to run as admin so it did it but it didnt make the map file. so i closed an ran as admin and tried again but its not working again. any suggestions?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on January 14, 2013, 09:54:49 pm
I am running as administrator, should i apply it in properties or just right click and run as admin everytime? my waw is legal i purchased it on steam. the program files was on another drive because my brother installed it wrong after we restored our computer, but i moved it back into the c drive were it should be and re-downloaded the scriptplacer, then i tried it again but forgot to run as admin so it did it but it didnt make the map file. so i closed an ran as admin and tried again but its not working again. any suggestions?
try giving admins/users full control of your world at war root folder. then do all of the above.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: KDXDARK on January 23, 2013, 01:18:27 am
when going to be release the new version to add the FX?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on January 23, 2013, 01:32:10 am
when going to be release the new version to add the FX?
Probably never, it's up to Aidan.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Hevymetallic on March 20, 2013, 08:03:48 pm
I can't download the file. I need this script placer as Mr Hankey's Script Placer doesn't work.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on March 20, 2013, 08:44:00 pm
I can't download the file. I need this script placer as Mr Hankey's Script Placer doesn't work.
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F0JZ4WJx.png&hash=2a772c012755bf09a39b1cc2d8cc0c84)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: KDXDARK on March 20, 2013, 11:07:14 pm
(http://i.imgur.com/0JZ4WJx.png)
its allowed on the same server the Script placer?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on March 20, 2013, 11:13:24 pm
its allowed on the same server the Script placer?
Yes I put them on the same server.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on March 23, 2013, 06:34:05 am
Download link updated to new server.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Chunkdogg9 on May 17, 2013, 08:39:38 am
Can you add the feature for the weather please Aidan!!!
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on May 17, 2013, 07:43:08 pm
Can you add the feature for the weather please Aidan!!!
Aidan isn't on the team anymore and he is the only one with the resource for the program.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: omgitsalic on August 15, 2013, 08:56:42 am
whens the update with the weather coming out?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on August 15, 2013, 11:39:56 am
whens the update with the weather coming out?
Probably not for a while, its not a concern of ours. Just make the weather yourself using _weather.gsc.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: EAT13 on October 06, 2013, 07:17:31 pm
is there a prototype map in this?? cuz im new to map making
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on October 06, 2013, 07:38:23 pm
is there a prototype map in this?? cuz im new to map making
Some say that when learning how to develop content for World at War you should start with prototype as it's easier to understand. I 100% disagree. The issue with learning prototype first rather then 1.4 Riese is that if you ever do decide to switch it's going to be difficult to understand the changes as you have adapted to the process you have already learned. Prototype style maps are also very un-updated and has many script issues that will make it more difficult to understand and follow by rather then going straight to 1.4. Also almost all support whether it's community response for issues or supported features to add are almost all designed for 1.4. Which means getting the support you need will be a very large hassle. The last obvious one would be with 1.4 you have way more features such as Perks, PAP, Zappers, Power switch, Dogs and more. It's a little bit more to take in but most of those features are just ready for you to paste into your map, and if you are running into issues help can always be found in the chat, on the wiki or on the forum. In conclusion no the script placer does not support prototype as we thought it was unnecessary.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on October 16, 2013, 01:53:13 am
Can you guys please work on a version 1.2 that would be sexy and great!
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Cheeseman14 on December 03, 2013, 09:00:21 pm
I have a problem when i use the script placer to make a map, after i finish everything and i try to run the map it comes up with an error saying this: "Server script compile error
Could not find script 'maps/nazi_zombie_sumpf_blockers'
(see console for details)"
Please help im new to mapping i just started last week
Title: Re: [App] UGX Script Placer [v1.1]
Post by: SajeOne on December 03, 2013, 10:22:42 pm
I have a problem when i use the script placer to make a map, after i finish everything and i try to run the map it comes up with an error saying this: "Server script compile error
Could not find script 'maps/nazi_zombie_sumpf_blockers'
(see console for details)"
Please help im new to mapping i just started last week
Are you sure your mod tools are updated to version 1.4? I don't think a DLC3 installation would try to reference that file. If you do I would check if the file exists within raw/maps.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: Cheeseman14 on December 11, 2013, 12:16:38 am
Are you sure your mod tools are updated to version 1.4? I don't think a DLC3 installation would try to reference that file. If you do I would check if the file exists within raw/maps.

Oh i didnt know there was a v1.4 for mod tools i thought it only went up to 1.3 thanx
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:20:24 am
I get this error when creating a loadscreen!
The following errors occoured:
- The loadscreen failed to load because it did not convert properly or this program did not have the rights to move files properly.
any suggestions? :)
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on December 12, 2013, 03:21:54 am
I get this error when creating a loadscreen!
The following errors occoured:
- The loadscreen failed to load because it did not convert properly or this program did not have the rights to move files properly.
any suggestions? :)
Try right clicking the Script Placer exe and choosing "Run as Administrator". It does not have the permissions to write to your root directory without that.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:28:30 am
It is running as admin :(
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on December 12, 2013, 03:29:16 am
It is running as admin :(
Then something is wrong with the format you saved your loadscreen in.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:30:25 am
Its saved as tga 2048x2048
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on December 12, 2013, 03:32:21 am
Its saved as tga 2048x2048
I'm not 100% sure if the program accepts TGA since I did not write the program - try DDS.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:33:39 am
I have tried dds same prob
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on December 12, 2013, 03:34:33 am
I have tried dds same prob
What program are you using? And have you tried JPG?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:36:08 am
Using paint.net and does it work for jpg?
Title: Re: [App] UGX Script Placer [v1.1]
Post by: treminaor on December 12, 2013, 03:37:18 am
Using paint.net and does it work for jpg?
Asset Manager supports JPG for colormaps, so it's worth trying in the Script Placer. And Paint.NET may not be creating valid formatting in TGA or DDS - try Photoshop if you have access to it, or use GIMP.
Title: Re: [App] UGX Script Placer [v1.1]
Post by: insanity3241 on December 12, 2013, 03:38:58 am
Ok thank you I have tried paint.net before and it worked just fine but thanks for all of the support!
Title: Re: [App] UGX Script Placer [v1.1]
Post by: cinnober on December 12, 2013, 04:36:01 pm
Its saved as tga 2048x2048

Change to 1024x1024
Title: Re: [App] UGX Script Placer [v1.1.3]
Post by: SajeOne on March 05, 2014, 01:51:07 am
Script placer update now live.

Changelog:
1.1.3:
- Fixed loadout.gsc issues based on map prefix
- Fixed file name replacement in launcher files
- Lowered FX usage by removing unused weapons
Title: Re: [App] UGX Script Placer [v1.1.4]
Post by: SajeOne on March 10, 2014, 06:28:02 pm
Changelog:
1.1.4:
- Fixed some DLC3 sounds not being included in created maps
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: SajeOne on April 01, 2014, 06:20:55 am
Changelog:
1.1.5:
- Fixed incorrect statement in _loadout.gsc
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: Alwoke78 on May 30, 2014, 02:38:56 pm
Hello, i want to create my first map, but when i create the map appears a window:
nazi_zombie_alvaro has been created. Information:

no files were placed

The following errors occoured
an unknown error occoured while writing this map files. This is probably because this program does not have proper rights to modify, create, or delete files


what is the problem?
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: Dust on May 30, 2014, 02:41:42 pm
Hello, i want to create my first map, but when i create the map appears a window:
nazi_zombie_alvaro has been created. Information:

no files were placed

The following errors occoured
an unknown error occoured while writing this map files. This is probably because this program does not have proper rights to modify, create, or delete files


what is the problem?

Right click it and run as adminstrator
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: Alwoke78 on May 30, 2014, 02:43:12 pm
solved!

thank you  ;D
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: ThePunisher on June 24, 2014, 06:18:46 pm
thank for your work
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: ASTR0x0M3GA on August 08, 2014, 03:23:14 am
http://gyazo.com/b5d727fc8972c4e3189f66de3ac2a46e (http://gyazo.com/b5d727fc8972c4e3189f66de3ac2a46e)
this happens when i compile cause i got the ugx juke box before the ugx script placer, how would i fix this
Title: Re: [App] UGX Script Placer [v1.1.5]
Post by: treminaor on August 08, 2014, 03:28:53 am
http://gyazo.com/b5d727fc8972c4e3189f66de3ac2a46e (http://gyazo.com/b5d727fc8972c4e3189f66de3ac2a46e)
this happens when i compile cause i got the ugx juke box before the ugx script placer, how would i fix this
Please redownload and reinstall the UGX Modtools patch, it was updated to v1.0.5 yesterday to fix this issue. I accidentally left a line for the hacker device inside _zombiemode_blockers_new.gsc - sorry.
Title: Re: [App] UGX Script Placer v1.1.6
Post by: treminaor on August 09, 2014, 02:57:25 am
1.1.6 released. Changelog:
- Removed placement of "sound,character,nazi_zombie_factory,all_sp" in mapname.csv which was causing a 1600 sounds error when trying to use a generated map with UGX Mod v1.0.x. This line has been moved to dlc3.csv in the latest update to the UGX Modtools Patch (v1.0.6) which can be downloaded from the UGX Wiki. The UGX Mod Standalone dlc3.csv will overwrite the Modtools Patch dlc3.csv, eliminating the possibility for the character sounds to be included when they shouldn't be.
Title: Re: [App] UGX Script Placer v1.1.6
Post by: SoulTaker on August 09, 2014, 03:31:13 am
1.1.6 released. Changelog:
- Removed placement of "sound,character,nazi_zombie_factory,all_sp" in mapname.csv which was causing a 1600 sounds error when trying to use a generated map with UGX Mod v1.0.x. This line has been moved to dlc3.csv in the latest update to the UGX Modtools Patch (v1.0.6) which can be downloaded from the UGX Wiki. The UGX Mod Standalone dlc3.csv will overwrite the Modtools Patch dlc3.csv, eliminating the possibility for the character sounds to be included when they shouldn't be.
Hey Trem just wanted to ask this every time I make a map with the UGX Script Placer I always spawn in with no weapon but if I hit the switch weapon button I get a super OP Colt. :P
It's an easy fix it but any clue what could have been causing this?
Title: Re: [App] UGX Script Placer v1.1.6
Post by: SajeOne on August 09, 2014, 03:34:00 am
Hey Trem just wanted to ask this every time I make a map with the UGX Script Placer I always spawn in with no weapon but if I hit the switch weapon button I get a super OP Colt. :P
It's an easy fix it but any clue what could have been causing this?
Paste the generated _loadout.gsc from your mod here.
Title: Re: [App] UGX Script Placer v1.1.6
Post by: SoulTaker on August 09, 2014, 03:43:19 am
Paste the generated _loadout.gsc from your mod here.
Give me a second I have to redo a map on the UGX Script Placer as I fixed the problem in my other maps that used the script placer ! ^_^

#include maps\_utility;

init_loadout()
{
// MikeD (7/30/2007): New method of precaching/giving weapons.
// Set the level variables.
if( !IsDefined( level.player_loadout ) )
{
level.player_loadout = [];
}

// CODER MOD
// With the player joining later now we need to precache all weapons for the level
init_models_and_variables_loadout();

players = get_players();
for ( i = 0; i < players.size; i++ )
{
players[i] give_loadout();
players[i].pers["class"] = "closequarters";
}
level.loadoutComplete = true;
level notify("loadout complete");


// these precaches should only happen per level and campaign

if (level.campaign == "russian")
{
if (level.script == "ber2")
{
mptype\player_rus_guard_wet::precache();
}
else if (level.script == "sniper")
{
// nothing!
}
else
{
mptype\player_rus_guard::precache();
}
}
else if (level.campaign == "american")
{
if (level.script == "pel1")
{
mptype\player_usa_marine::precache();
}
else if (level.script == "pel1a" || level.script == "pel2")
{
mptype\player_usa_marine::precache();
}
else if (level.script == "oki2")
{
mptype\player_usa_marine_wet::precache();
}
else if( level.script == "mak")
{
mptype\player_usa_raider::precache();
}
else if ( level.script == "pby_fly")
{
//nothing
}
else if( isDefined( level.use_zombie_heroes ) && level.use_zombie_heroes )
{

mptype\nazi_zombie_heroes::precache();

}
else
{
mptype\player_usa_marine::precache();
}
}
else
{
mptype\player_usa_marine::precache();
}
}

init_models_and_variables_loadout()
{
// SCRIPTER_MOD
// MikeD (3/16/2007): Testmap for Coop
if( level.script == "coop_test1" )
{
add_weapon( "m1garand" );
add_weapon( "thompson" );
add_weapon( "fraggrenade" );
set_switch_weapon( "m1garand" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( level.script == "mak" ) // MikeD
{
add_weapon( "nambu" );
set_switch_weapon( "nambu" );
set_laststand_pistol( "nambu" );

set_player_viewmodel( "viewmodel_usa_raider_arms" );
set_player_interactive_hands( "viewmodel_usa_raider_player" );

level.campaign = "american";
return;
}
else if( level.script == "pel1" ) // Jesse
{
add_weapon( "colt");
add_weapon( "m1garand_bayonet" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
add_weapon( "rocket_barrage" );
set_action_slot( 4, "weapon", "rocket_barrage" );
set_secondary_offhand( "smoke" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

// CODER MOD (Austin & Sumeet 11/3/07)
// Fix bugs #1056 & #1057 with co-op players having no weapon selected
set_switch_weapon( "m1garand_bayonet" );

level.campaign = "american";
return;
}
else if( level.script == "pel1a" ) // MikeD
{
add_weapon( "m1garand" );
PrecacheItem( "m2_flamethrower" );
//add_weapon( "m2_flamethrower" );
add_weapon( "thompson" );
//TFLAME - Bug about 3 weapons
//add_weapon( "colt" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );
// set_switch_weapon( "m2_flamethrower" );
set_switch_weapon( "m1garand" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "pel1b" )
{
// TODO add level-specific weapons
add_weapon( "shotgun" );
add_weapon( "30cal_bipod" );
//add_weapon( "colt");
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "30cal_bipod" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");

level.campaign = "american";
return;
}
else if (level.script == "pby_fly" ) // Gavin
{
//add_weapon( "pby_backgun" );
//add_weapon( "pby_frontgun" );
//add_weapon( "pby_rightgun" );
//add_weapon( "pby_leftgun" );
//set_action_slot( 1, "weapon", "pby_frontgun" );
//set_action_slot( 4, "weapon", "pby_rightgun" );
//set_action_slot( 2, "weapon", "pby_backgun" );
//set_action_slot( 3, "weapon", "pby_leftgun" );

set_laststand_pistol( "colt" ); // No revive while in the air!

set_player_viewmodel( "viewmodel_usa_pbycrew_arms");

level.campaign = "american";
return;
}
else if( level.script == "pel2" ) // DPG (7/9/2007): Peleliu 2
{
add_weapon( "colt" );

add_weapon( "bar" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );

set_switch_weapon( "bar" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "see1" ) // Alex Liu
{
add_weapon( "mosin_rifle" );
add_weapon( "tokarev" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "see2" ) // DPG (7/9/2007): Seelow 2
{
//add_weapon( "mosin_rifle" );
add_weapon( "m2_flamethrower" );
add_weapon( "ppsh" );
add_weapon( "stick_grenade" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "m2_flamethrower" );

set_laststand_pistol( "none" ); // Players are in a tank

// SRS 6/24/2008: don't need visible viewarms because you're in a tank

level.campaign = "russian";
return;
}
else if( level.script == "ber1" ) // Bloodlust (7/06/2007): Berlin 1
{
add_weapon( "tokarev" );
add_weapon( "mosin_rifle" );
add_weapon( "stick_grenade" );
//add_weapon( "m8_white_smoke" );
add_weapon( "molotov" );
set_secondary_offhand( "molotov" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "ber1_geo" ) // Bloodlust (10/22/2007): Berlin 1 Geo (for Brandon)
{
add_weapon( "mosin_rifle" );
add_weapon( "ppsh" );
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "ber2" ) // SS
{
add_weapon( "ppsh" );
add_weapon( "tokarev" );
//add_weapon( "mosin_rifle" );  // SRS 5/9/2008: need to pick either the rifle or the SMG to start
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "ppsh" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "sniper" ) // TFlame 2/12/08 - only weapon player should have is a scoped rifle
{
add_weapon( "mosin_rifle_scoped" );
add_weapon( "stick_grenade" );
set_switch_weapon("mosin_rifle_scoped");

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");
set_player_interactive_hands( "viewmodel_rus_guard_player" );

level.campaign = "russian";
return;
}
else if( level.script == "ber3" ) // Joyal
{
add_weapon( "svt40" );
add_weapon( "ppsh" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "ppsh" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel("viewmodel_rus_guard_arms");
level.campaign = "russian";
return;
}
else if( level.script == "ber3b" ) // SS
{
add_weapon( "tokarev" );
add_weapon( "svt40" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "svt40" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "oki2" ) // JeremyS
{
add_weapon( "30cal_wet" );
//add_weapon( "m2_flamethrower_wet" );
PrecacheItem( "m2_flamethrower_wet" );
add_weapon( "thompson_wet" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
//add_weapon( "satchel_charge" );
set_secondary_offhand( "smoke" );
// set_switch_weapon( "m2_flamethrower_wet" );
set_switch_weapon( "thompson_wet" );


set_laststand_pistol( "colt_wet" );

set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms");
set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai

level.campaign = "american";
return;
}
else if( level.script == "prologue" ) // Lucas (03/14/2008)
{
add_weapon( "m1garand" );
add_weapon( "colt" );
set_switch_weapon( "colt" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( level.script == "oki3" ) // ChrisP
{
add_weapon( "m1garand" );
add_weapon( "thompson" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
add_weapon("air_support");
set_action_slot( 4, "weapon", "air_support" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "m1garand" );
set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "living_battlefield" )
{
add_weapon( "m1garand_bayonet" );
add_weapon( "thompson" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
add_weapon( "fraggrenade" );
set_secondary_offhand( "flash" );
set_switch_weapon( "m1garand_bayonet" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( GetDvar( "zombiemode" ) == "1" || IsSubStr( level.script, "nazi_zombie_" ) || level.script == "zombie_test_map" ) // CODER_MOD (Austin 5/4/08): zombiemode loadout setup
{
add_weapon( "zombie_colt" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_switch_weapon( "zombie_colt" );

set_laststand_pistol( "zombie_colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");

level.campaign = "american";
return;
}
else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns
{
return;
}
else if( level.script == "credits" )
{
set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");
level.campaign = "american";
return;
}


//------------------------------------
// level.script is not a single player level. give default weapons.
println ("loadout.gsc:     No level listing in _loadout.gsc, giving default guns!!!! =======================");

// default weapons
add_weapon( "colt" );
add_weapon( "m1garand" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );

set_laststand_pistol( "colt" );
set_switch_weapon( "m1garand" );

// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms
if( IsDefined( level.campaign ) && level.campaign == "russian" )
{
set_player_viewmodel( "viewmodel_rus_guard_arms");
}
else
{
set_player_viewmodel( "viewmodel_usa_marine_arms");
level.campaign = "american";
}
}

// This will precache and set the loadout rather than duplicating work.
add_weapon( weapon_name )
{
PrecacheItem( weapon_name );
level.player_loadout[level.player_loadout.size] = weapon_name;
}

// This sets the secondary offhand type when the player spawns in
set_secondary_offhand( weapon_name )
{
level.player_secondaryoffhand = weapon_name;
}

// This sets the the switchtoweapon when the player spawns in
set_switch_weapon( weapon_name )
{
level.player_switchweapon = weapon_name;
}

// This sets the the action slot for when the player spawns in
set_action_slot( num, option1, option2 )
{

if( num < 2 || num > 4)
{
if(level.script != "pby_fly")  // GLocke 11/15/2007 - The flying level uses all 4 dpad slots
{
// Not using 1, since it's defaulted to grenade launcher.
assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" );
}
}

// Glocke 12/03/07 - added precaching of weapon type for action slot
if(IsDefined(option1))
{
if(option1 == "weapon")
{
PrecacheItem(option2);
level.player_loadout[level.player_loadout.size] = option2;
}
}

if( !IsDefined( level.player_actionslots ) )
{
level.player_actionslots = [];
}

action_slot = SpawnStruct();
action_slot.num = num;
action_slot.option1 = option1;

if( IsDefined( option2 ) )
{
action_slot.option2 = option2;
}

level.player_actionslots[level.player_actionslots.size] = action_slot;
}

// Sets the player's viewmodel
set_player_viewmodel( viewmodel )
{
PrecacheModel( viewmodel );
level.player_viewmodel = viewmodel;
}

// Sets the player's handmodel used for "interactive" hands and banzai attacks
set_player_interactive_hands( model )
{
level.player_interactive_hands = model;
PrecacheModel( level.player_interactive_hands );
}

// Sets the player's laststand pistol
set_laststand_pistol( weapon )
{
level.laststandpistol = weapon;
}

give_loadout(wait_for_switch_weapon)
{
if( !IsDefined( game["gaveweapons"] ) )
{
game["gaveweapons"] = 0;
}

if( !IsDefined( game["expectedlevel"] ) )
{
game["expectedlevel"] = "";
}

if( game["expectedlevel"] != level.script )
{
game["gaveweapons"] = 0;
}

if( game["gaveweapons"] == 0 )
{
game["gaveweapons"] = 1;
}

// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at
// least have a grenade in his inventory before doing so. So let's try to find out and give it to him
// then take it away.
gave_grenade = false;

// First check to see if we are giving him a grenade, if so, skip this process.
for( i = 0; i < level.player_loadout.size; i++ )
{
if( WeaponType( level.player_loadout[i] ) == "grenade" )
{
gave_grenade = true;
break;
}
}

// If we do not have a grenade then try to automatically assign one
// If we can't automatically do this, then the scripter needs to do by hand in the level
if( !gave_grenade )
{
if( IsDefined( level.player_grenade ) )
{
grenade = level.player_grenade;
self GiveWeapon( grenade );
self SetWeaponAmmoStock( grenade, 0 );
gave_grenade = true;
}

if( !gave_grenade )
{
// Get all of the AI and assign any grenade to the player
ai = GetAiArray( "allies" );

if( IsDefined( ai ) )
{
for( i = 0; i < ai.size; i++ )
{
if( IsDefined( ai[i].grenadeWeapon ) )
{
grenade = ai[i].grenadeWeapon;
self GiveWeapon( grenade );
self SetWeaponAmmoStock( grenade, 0 );
break;
}
}
}

println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." );
}
}

for( i = 0; i < level.player_loadout.size; i++ )
{
self GiveWeapon( level.player_loadout[i] );
}

self SetActionSlot( 1, "" );
self SetActionSlot( 2, "" );
self SetActionSlot( 3, "altMode" ); // toggles between attached grenade launcher
self SetActionSlot( 4, "" );

if( IsDefined( level.player_actionslots ) )
{
for( i = 0; i < level.player_actionslots.size; i++ )
{
num = level.player_actionslots[i].num;
option1 = level.player_actionslots[i].option1;

if( IsDefined( level.player_actionslots[i].option2 ) )
{
option2 = level.player_actionslots[i].option2;
self SetActionSlot( num, option1, option2 );
}
else
{
self SetActionSlot( num, option1 );
}
}
}

if( IsDefined( level.player_switchweapon ) )
{
// the wait was added to fix a revive issue with the host
// for some reson the SwitchToWeapon message gets lost
// this can be removed if that is ever resolved
if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true )
{
wait(0.5);
}
self SwitchToWeapon( level.player_switchweapon );
}

wait(0.5);

self player_flag_set("loadout_given");
}

give_model( class )
{
// switch ( level.campaign )
// {
// case "russian":
// self mptype\player_rus_guard::main();
// break;
// case "american":
// default:
// self mptype\player_usa_marine::main();
// break;

if (level.campaign == "russian")
{
if (level.script == "ber2")
{
self mptype\player_rus_guard_wet::main();
}
else if (level.script == "sniper")
{
// nothing!
}
else
{
self mptype\player_rus_guard::main();
}
}
else if (level.campaign == "american")
{
if (level.script == "pel1")
{
self mptype\player_usa_marine::main();
}
else if (level.script == "pel1a" || level.script == "pel2")
{
self mptype\player_usa_marine::main();
}
else if (level.script == "oki2")
{
self mptype\player_usa_marine_wet::main();
}
else if (level.script == "mak")
{
self mptype\player_usa_raider::main();
}
else if ( level.script == "pby_fly")
{
//nothing
}
else if( isDefined( level.use_zombie_heroes ) && level.use_zombie_heroes )
{

switch( self.entity_num)
{
case 0:
character\char_zomb_player_0::main();
break;
case 1:
character\char_zomb_player_1::main();
break;
case 2:
character\char_zomb_player_2::main();
break;
case 3:
character\char_zomb_player_3::main();
break;
}

}
else
{
self mptype\player_usa_marine::main();
}
}
else
{
self mptype\player_usa_marine::main();
}







// }

// MikeD (3/28/2008): If specified, give the player his hands
if( IsDefined( level.player_viewmodel ) )
{
self SetViewModel( level.player_viewmodel );
}
}

///////////////////////////////////////////////
// SavePlayerWeaponStatePersistent
//
// Saves the player's weapons and ammo state persistently( in the game variable )
// so that it can be restored in a different map.
// You can use strings for the slot:
//
// SavePlayerWeaponStatePersistent( "russianCampaign" );
//
// Or you can just use numbers:
//
// SavePlayerWeaponStatePersistent( 0 );
// SavePlayerWeaponStatePersistent( 1 ); etc.
//
// In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot );
// Make sure that you always persist the data between map changes.

SavePlayerWeaponStatePersistent( slot )
{
current = level.player getCurrentWeapon();
if ( ( !isdefined( current ) ) || ( current == "none" ) )
assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." );
game[ "weaponstates" ][ slot ][ "current" ] = current;

offhand = level.player getcurrentoffhand();
game[ "weaponstates" ][ slot ][ "offhand" ] = offhand;

game[ "weaponstates" ][ slot ][ "list" ] = [];
weapList = level.player GetWeaponsList();
for ( weapIdx = 0; weapIdx < weapList.size; weapIdx++ )
{
game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "name" ] = weapList[ weapIdx ];

// below is only used if we want to NOT give max ammo
// game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] = level.player GetWeaponAmmoClip( weapList[ weapIdx ] );
// game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] = level.player GetWeaponAmmoStock( weapList[ weapIdx ] );
}
}

RestorePlayerWeaponStatePersistent( slot )
{
if ( !isDefined( game[ "weaponstates" ] ) )
return false;
if ( !isDefined( game[ "weaponstates" ][ slot ] ) )
return false;

level.player takeallweapons();

for ( weapIdx = 0; weapIdx < game[ "weaponstates" ][ slot ][ "list" ].size; weapIdx++ )
{
weapName = game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "name" ];

if ( isdefined( level.legit_weapons ) )
{
// weapon doesn't exist in this level
if ( !isdefined( level.legit_weapons[ weapName ] ) )
continue;
}

// don't carry over C4 or claymores
if ( weapName == "c4" )
continue;
if ( weapName == "claymore" )
continue;
level.player GiveWeapon( weapName );
level.player GiveMaxAmmo( weapName );

// below is only used if we want to NOT give max ammo
// level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] );
// level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] );
}

if ( isdefined( level.legit_weapons ) )
{
weapname = game[ "weaponstates" ][ slot ][ "offhand" ];
if ( isdefined( level.legit_weapons[ weapName ] ) )
level.player switchtooffhand( weapname );

weapname = game[ "weaponstates" ][ slot ][ "current" ];
if ( isdefined( level.legit_weapons[ weapName ] ) )
level.player SwitchToWeapon( weapname );
}
else
{
level.player switchtooffhand( game[ "weaponstates" ][ slot ][ "offhand" ] );
level.player SwitchToWeapon( game[ "weaponstates" ][ slot ][ "current" ] );
}

return true;
}

Title: Re: [App] UGX Script Placer v1.1.6
Post by: SajeOne on August 09, 2014, 04:05:40 am
Give me a second I have to redo a map on the UGX Script Placer as I fixed the problem in my other maps that used the script placer ! ^_^

#include maps\_utility;

init_loadout()
{
// MikeD (7/30/2007): New method of precaching/giving weapons.
// Set the level variables.
if( !IsDefined( level.player_loadout ) )
{
level.player_loadout = [];
}

// CODER MOD
// With the player joining later now we need to precache all weapons for the level
init_models_and_variables_loadout();

players = get_players();
for ( i = 0; i < players.size; i++ )
{
players[i] give_loadout();
players[i].pers["class"] = "closequarters";
}
level.loadoutComplete = true;
level notify("loadout complete");


// these precaches should only happen per level and campaign

if (level.campaign == "russian")
{
if (level.script == "ber2")
{
mptype\player_rus_guard_wet::precache();
}
else if (level.script == "sniper")
{
// nothing!
}
else
{
mptype\player_rus_guard::precache();
}
}
else if (level.campaign == "american")
{
if (level.script == "pel1")
{
mptype\player_usa_marine::precache();
}
else if (level.script == "pel1a" || level.script == "pel2")
{
mptype\player_usa_marine::precache();
}
else if (level.script == "oki2")
{
mptype\player_usa_marine_wet::precache();
}
else if( level.script == "mak")
{
mptype\player_usa_raider::precache();
}
else if ( level.script == "pby_fly")
{
//nothing
}
else if( isDefined( level.use_zombie_heroes ) && level.use_zombie_heroes )
{

mptype\nazi_zombie_heroes::precache();

}
else
{
mptype\player_usa_marine::precache();
}
}
else
{
mptype\player_usa_marine::precache();
}
}

init_models_and_variables_loadout()
{
// SCRIPTER_MOD
// MikeD (3/16/2007): Testmap for Coop
if( level.script == "coop_test1" )
{
add_weapon( "m1garand" );
add_weapon( "thompson" );
add_weapon( "fraggrenade" );
set_switch_weapon( "m1garand" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( level.script == "mak" ) // MikeD
{
add_weapon( "nambu" );
set_switch_weapon( "nambu" );
set_laststand_pistol( "nambu" );

set_player_viewmodel( "viewmodel_usa_raider_arms" );
set_player_interactive_hands( "viewmodel_usa_raider_player" );

level.campaign = "american";
return;
}
else if( level.script == "pel1" ) // Jesse
{
add_weapon( "colt");
add_weapon( "m1garand_bayonet" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
add_weapon( "rocket_barrage" );
set_action_slot( 4, "weapon", "rocket_barrage" );
set_secondary_offhand( "smoke" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

// CODER MOD (Austin & Sumeet 11/3/07)
// Fix bugs #1056 & #1057 with co-op players having no weapon selected
set_switch_weapon( "m1garand_bayonet" );

level.campaign = "american";
return;
}
else if( level.script == "pel1a" ) // MikeD
{
add_weapon( "m1garand" );
PrecacheItem( "m2_flamethrower" );
//add_weapon( "m2_flamethrower" );
add_weapon( "thompson" );
//TFLAME - Bug about 3 weapons
//add_weapon( "colt" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );
// set_switch_weapon( "m2_flamethrower" );
set_switch_weapon( "m1garand" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "pel1b" )
{
// TODO add level-specific weapons
add_weapon( "shotgun" );
add_weapon( "30cal_bipod" );
//add_weapon( "colt");
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "30cal_bipod" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");

level.campaign = "american";
return;
}
else if (level.script == "pby_fly" ) // Gavin
{
//add_weapon( "pby_backgun" );
//add_weapon( "pby_frontgun" );
//add_weapon( "pby_rightgun" );
//add_weapon( "pby_leftgun" );
//set_action_slot( 1, "weapon", "pby_frontgun" );
//set_action_slot( 4, "weapon", "pby_rightgun" );
//set_action_slot( 2, "weapon", "pby_backgun" );
//set_action_slot( 3, "weapon", "pby_leftgun" );

set_laststand_pistol( "colt" ); // No revive while in the air!

set_player_viewmodel( "viewmodel_usa_pbycrew_arms");

level.campaign = "american";
return;
}
else if( level.script == "pel2" ) // DPG (7/9/2007): Peleliu 2
{
add_weapon( "colt" );

add_weapon( "bar" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );

set_switch_weapon( "bar" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "see1" ) // Alex Liu
{
add_weapon( "mosin_rifle" );
add_weapon( "tokarev" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "see2" ) // DPG (7/9/2007): Seelow 2
{
//add_weapon( "mosin_rifle" );
add_weapon( "m2_flamethrower" );
add_weapon( "ppsh" );
add_weapon( "stick_grenade" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "m2_flamethrower" );

set_laststand_pistol( "none" ); // Players are in a tank

// SRS 6/24/2008: don't need visible viewarms because you're in a tank

level.campaign = "russian";
return;
}
else if( level.script == "ber1" ) // Bloodlust (7/06/2007): Berlin 1
{
add_weapon( "tokarev" );
add_weapon( "mosin_rifle" );
add_weapon( "stick_grenade" );
//add_weapon( "m8_white_smoke" );
add_weapon( "molotov" );
set_secondary_offhand( "molotov" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "ber1_geo" ) // Bloodlust (10/22/2007): Berlin 1 Geo (for Brandon)
{
add_weapon( "mosin_rifle" );
add_weapon( "ppsh" );
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "mosin_rifle" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "ber2" ) // SS
{
add_weapon( "ppsh" );
add_weapon( "tokarev" );
//add_weapon( "mosin_rifle" );  // SRS 5/9/2008: need to pick either the rifle or the SMG to start
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "ppsh" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "sniper" ) // TFlame 2/12/08 - only weapon player should have is a scoped rifle
{
add_weapon( "mosin_rifle_scoped" );
add_weapon( "stick_grenade" );
set_switch_weapon("mosin_rifle_scoped");

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");
set_player_interactive_hands( "viewmodel_rus_guard_player" );

level.campaign = "russian";
return;
}
else if( level.script == "ber3" ) // Joyal
{
add_weapon( "svt40" );
add_weapon( "ppsh" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "ppsh" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel("viewmodel_rus_guard_arms");
level.campaign = "russian";
return;
}
else if( level.script == "ber3b" ) // SS
{
add_weapon( "tokarev" );
add_weapon( "svt40" );
// CODER_MOD: Austin (7/31/08): added stick grenade for russian campaign to replace smoke (BUG 17665)
add_weapon( "stick_grenade" );
add_weapon( "molotov" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "svt40" );

set_laststand_pistol( "tokarev" );

set_player_viewmodel( "viewmodel_rus_guard_arms");

level.campaign = "russian";
return;
}
else if( level.script == "oki2" ) // JeremyS
{
add_weapon( "30cal_wet" );
//add_weapon( "m2_flamethrower_wet" );
PrecacheItem( "m2_flamethrower_wet" );
add_weapon( "thompson_wet" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
//add_weapon( "satchel_charge" );
set_secondary_offhand( "smoke" );
// set_switch_weapon( "m2_flamethrower_wet" );
set_switch_weapon( "thompson_wet" );


set_laststand_pistol( "colt_wet" );

set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms");
set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai

level.campaign = "american";
return;
}
else if( level.script == "prologue" ) // Lucas (03/14/2008)
{
add_weapon( "m1garand" );
add_weapon( "colt" );
set_switch_weapon( "colt" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( level.script == "oki3" ) // ChrisP
{
add_weapon( "m1garand" );
add_weapon( "thompson" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
add_weapon("air_support");
set_action_slot( 4, "weapon", "air_support" );
set_secondary_offhand( "smoke" );
set_switch_weapon( "m1garand" );
set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player" );

level.campaign = "american";
return;
}
else if( level.script == "living_battlefield" )
{
add_weapon( "m1garand_bayonet" );
add_weapon( "thompson" );
add_weapon( "molotov" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
add_weapon( "fraggrenade" );
set_secondary_offhand( "flash" );
set_switch_weapon( "m1garand_bayonet" );

set_laststand_pistol( "colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");

level.campaign = "american";
return;
}
else if( GetDvar( "zombiemode" ) == "1" || IsSubStr( level.script, "nazi_zombie_" ) || level.script == "zombie_test_map" ) // CODER_MOD (Austin 5/4/08): zombiemode loadout setup
{
add_weapon( "zombie_colt" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_switch_weapon( "zombie_colt" );

set_laststand_pistol( "zombie_colt" );

set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");

level.campaign = "american";
return;
}
else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns
{
return;
}
else if( level.script == "credits" )
{
set_player_viewmodel( "viewmodel_usa_marine_arms");
set_player_interactive_hands( "viewmodel_usa_marine_player");
level.campaign = "american";
return;
}


//------------------------------------
// level.script is not a single player level. give default weapons.
println ("loadout.gsc:     No level listing in _loadout.gsc, giving default guns!!!! =======================");

// default weapons
add_weapon( "colt" );
add_weapon( "m1garand" );
add_weapon( "fraggrenade" );
add_weapon( "m8_white_smoke" );
set_secondary_offhand( "smoke" );

set_laststand_pistol( "colt" );
set_switch_weapon( "m1garand" );

// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms
if( IsDefined( level.campaign ) && level.campaign == "russian" )
{
set_player_viewmodel( "viewmodel_rus_guard_arms");
}
else
{
set_player_viewmodel( "viewmodel_usa_marine_arms");
level.campaign = "american";
}
}

// This will precache and set the loadout rather than duplicating work.
add_weapon( weapon_name )
{
PrecacheItem( weapon_name );
level.player_loadout[level.player_loadout.size] = weapon_name;
}

// This sets the secondary offhand type when the player spawns in
set_secondary_offhand( weapon_name )
{
level.player_secondaryoffhand = weapon_name;
}

// This sets the the switchtoweapon when the player spawns in
set_switch_weapon( weapon_name )
{
level.player_switchweapon = weapon_name;
}

// This sets the the action slot for when the player spawns in
set_action_slot( num, option1, option2 )
{

if( num < 2 || num > 4)
{
if(level.script != "pby_fly")  // GLocke 11/15/2007 - The flying level uses all 4 dpad slots
{
// Not using 1, since it's defaulted to grenade launcher.
assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" );
}
}

// Glocke 12/03/07 - added precaching of weapon type for action slot
if(IsDefined(option1))
{
if(option1 == "weapon")
{
PrecacheItem(option2);
level.player_loadout[level.player_loadout.size] = option2;
}
}

if( !IsDefined( level.player_actionslots ) )
{
level.player_actionslots = [];
}

action_slot = SpawnStruct();
action_slot.num = num;
action_slot.option1 = option1;

if( IsDefined( option2 ) )
{
action_slot.option2 = option2;
}

level.player_actionslots[level.player_actionslots.size] = action_slot;
}

// Sets the player's viewmodel
set_player_viewmodel( viewmodel )
{
PrecacheModel( viewmodel );
level.player_viewmodel = viewmodel;
}

// Sets the player's handmodel used for "interactive" hands and banzai attacks
set_player_interactive_hands( model )
{
level.player_interactive_hands = model;
PrecacheModel( level.player_interactive_hands );
}

// Sets the player's laststand pistol
set_laststand_pistol( weapon )
{
level.laststandpistol = weapon;
}

give_loadout(wait_for_switch_weapon)
{
if( !IsDefined( game["gaveweapons"] ) )
{
game["gaveweapons"] = 0;
}

if( !IsDefined( game["expectedlevel"] ) )
{
game["expectedlevel"] = "";
}

if( game["expectedlevel"] != level.script )
{
game["gaveweapons"] = 0;
}

if( game["gaveweapons"] == 0 )
{
game["gaveweapons"] = 1;
}

// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at
// least have a grenade in his inventory before doing so. So let's try to find out and give it to him
// then take it away.
gave_grenade = false;

// First check to see if we are giving him a grenade, if so, skip this process.
for( i = 0; i < level.player_loadout.size; i++ )
{
if( WeaponType( level.player_loadout[i] ) == "grenade" )
{
gave_grenade = true;
break;
}
}

// If we do not have a grenade then try to automatically assign one
// If we can't automatically do this, then the scripter needs to do by hand in the level
if( !gave_grenade )
{
if( IsDefined( level.player_grenade ) )
{
grenade = level.player_grenade;
self GiveWeapon( grenade );
self SetWeaponAmmoStock( grenade, 0 );
gave_grenade = true;
}

if( !gave_grenade )
{
// Get all of the AI and assign any grenade to the player
ai = GetAiArray( "allies" );

if( IsDefined( ai ) )
{
for( i = 0; i < ai.size; i++ )
{
if( IsDefined( ai[i].grenadeWeapon ) )
{
grenade = ai[i].grenadeWeapon;
self GiveWeapon( grenade );
self SetWeaponAmmoStock( grenade, 0 );
break;
}
}
}

println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." );
}
}

for( i = 0; i < level.player_loadout.size; i++ )
{
self GiveWeapon( level.player_loadout[i] );
}

self SetActionSlot( 1, "" );
self SetActionSlot( 2, "" );
self SetActionSlot( 3, "altMode" ); // toggles between attached grenade launcher
self SetActionSlot( 4, "" );

if( IsDefined( level.player_actionslots ) )
{
for( i = 0; i < level.player_actionslots.size; i++ )
{
num = level.player_actionslots[i].num;
option1 = level.player_actionslots[i].option1;

if( IsDefined( level.player_actionslots[i].option2 ) )
{
option2 = level.player_actionslots[i].option2;
self SetActionSlot( num, option1, option2 );
}
else
{
self SetActionSlot( num, option1 );
}
}
}

if( IsDefined( level.player_switchweapon ) )
{
// the wait was added to fix a revive issue with the host
// for some reson the SwitchToWeapon message gets lost
// this can be removed if that is ever resolved
if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true )
{
wait(0.5);
}
self SwitchToWeapon( level.player_switchweapon );
}

wait(0.5);

self player_flag_set("loadout_given");
}

give_model( class )
{
// switch ( level.campaign )
// {
// case "russian":
// self mptype\player_rus_guard::main();
// break;
// case "american":
// default:
// self mptype\player_usa_marine::main();
// break;

if (level.campaign == "russian")
{
if (level.script == "ber2")
{
self mptype\player_rus_guard_wet::main();
}
else if (level.script == "sniper")
{
// nothing!
}
else
{
self mptype\player_rus_guard::main();
}
}
else if (level.campaign == "american")
{
if (level.script == "pel1")
{
self mptype\player_usa_marine::main();
}
else if (level.script == "pel1a" || level.script == "pel2")
{
self mptype\player_usa_marine::main();
}
else if (level.script == "oki2")
{
self mptype\player_usa_marine_wet::main();
}
else if (level.script == "mak")
{
self mptype\player_usa_raider::main();
}
else if ( level.script == "pby_fly")
{
//nothing
}
else if( isDefined( level.use_zombie_heroes ) && level.use_zombie_heroes )
{

switch( self.entity_num)
{
case 0:
character\char_zomb_player_0::main();
break;
case 1:
character\char_zomb_player_1::main();
break;
case 2:
character\char_zomb_player_2::main();
break;
case 3:
character\char_zomb_player_3::main();
break;
}

}
else
{
self mptype\player_usa_marine::main();
}
}
else
{
self mptype\player_usa_marine::main();
}







// }

// MikeD (3/28/2008): If specified, give the player his hands
if( IsDefined( level.player_viewmodel ) )
{
self SetViewModel( level.player_viewmodel );
}
}

///////////////////////////////////////////////
// SavePlayerWeaponStatePersistent
//
// Saves the player's weapons and ammo state persistently( in the game variable )
// so that it can be restored in a different map.
// You can use strings for the slot:
//
// SavePlayerWeaponStatePersistent( "russianCampaign" );
//
// Or you can just use numbers:
//
// SavePlayerWeaponStatePersistent( 0 );
// SavePlayerWeaponStatePersistent( 1 ); etc.
//
// In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot );
// Make sure that you always persist the data between map changes.

SavePlayerWeaponStatePersistent( slot )
{
current = level.player getCurrentWeapon();
if ( ( !isdefined( current ) ) || ( current == "none" ) )
assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." );
game[ "weaponstates" ][ slot ][ "current" ] = current;

offhand = level.player getcurrentoffhand();
game[ "weaponstates" ][ slot ][ "offhand" ] = offhand;

game[ "weaponstates" ][ slot ][ "list" ] = [];
weapList = level.player GetWeaponsList();
for ( weapIdx = 0; weapIdx < weapList.size; weapIdx++ )
{
game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "name" ] = weapList[ weapIdx ];

// below is only used if we want to NOT give max ammo
// game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] = level.player GetWeaponAmmoClip( weapList[ weapIdx ] );
// game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] = level.player GetWeaponAmmoStock( weapList[ weapIdx ] );
}
}

RestorePlayerWeaponStatePersistent( slot )
{
if ( !isDefined( game[ "weaponstates" ] ) )
return false;
if ( !isDefined( game[ "weaponstates" ][ slot ] ) )
return false;

level.player takeallweapons();

for ( weapIdx = 0; weapIdx < game[ "weaponstates" ][ slot ][ "list" ].size; weapIdx++ )
{
weapName = game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "name" ];

if ( isdefined( level.legit_weapons ) )
{
// weapon doesn't exist in this level
if ( !isdefined( level.legit_weapons[ weapName ] ) )
continue;
}

// don't carry over C4 or claymores
if ( weapName == "c4" )
continue;
if ( weapName == "claymore" )
continue;
level.player GiveWeapon( weapName );
level.player GiveMaxAmmo( weapName );

// below is only used if we want to NOT give max ammo
// level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] );
// level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] );
}

if ( isdefined( level.legit_weapons ) )
{
weapname = game[ "weaponstates" ][ slot ][ "offhand" ];
if ( isdefined( level.legit_weapons[ weapName ] ) )
level.player switchtooffhand( weapname );

weapname = game[ "weaponstates" ][ slot ][ "current" ];
if ( isdefined( level.legit_weapons[ weapName ] ) )
level.player SwitchToWeapon( weapname );
}
else
{
level.player switchtooffhand( game[ "weaponstates" ][ slot ][ "offhand" ] );
level.player SwitchToWeapon( game[ "weaponstates" ][ slot ][ "current" ] );
}

return true;
}

Ensure you have the latest version of the script placer as this file does not match the file that the script placer places. Either the version you have is old or you replaced the updated file.
Title: Re: [App] UGX Script Placer v1.1.6
Post by: SoulTaker on August 09, 2014, 04:07:59 am
Ensure you have the latest version of the script placer as this file does not match the file that the script placer places. Either the version you have is old or you replaced the updated file.
Well recently I have had to replace things in my mod tools, because I was an idiot and hit the converter option by accident. Thanks for clarifying that though Saje I really do appreciate it !
Title: Re: [App] UGX Script Placer v1.1.6
Post by: treminaor on August 09, 2014, 04:10:24 am
Well recently I have had to replace things in my mod tools, because I was an idiot and hit the converter option by accident. Thanks for clarifying that though Saje I really do appreciate it !
Tom BMX has a modified converter.exe on his downloads section that prevents converter from ruining your raw directory - I suggest using it :)
Title: Re: [App] UGX Script Placer v1.1.6
Post by: SoulTaker on August 09, 2014, 04:26:56 am
Tom BMX has a modified converter.exe on his downloads section that prevents converter from ruining your raw directory - I suggest using it :)
I know one day I saw it, and I thought to myself I will never hit that converter button ever and I paid for it! Will be getting it though now. :P