mirror of
https://github.com/Resxt/Plutonium-T6-Scripts.git
synced 2025-04-19 13:42:54 +00:00
Remove everything about compiled files
Just a refactor that doesn't affect any script or add anything new. Plutonium T6 now supports loading source scripts so compiling them isn't needed anymore https://plutonium.pw/docs/changelog/#r3408 [Refactor] Removed all compiled scripts Moved all source scripts to the main folder instead of a source folder Renamed all source scripts to remove the source tag at the end Removed notions of compiled and source scripts in the repository's README
This commit is contained in:
parent
011b7fa786
commit
4501736b79
35
README.md
35
README.md
@ -10,17 +10,15 @@ Huge thanks to everyone who helped me learn GSC: Birchy, DoktorSAS, FutureRave a
|
||||
|
||||
## How do I download a script?
|
||||
|
||||
If you are unsure whether you should download a compiled or a source script, first read [What are compiled and source scripts?](#what-are-compiled-and-source-scripts)
|
||||
|
||||
- [Download this repository](https://github.com/Resxt/Plutonium-T6-Scripts/archive/refs/heads/master.zip)
|
||||
- Open the downloaded ZIP file
|
||||
- Drag and drop the script(s) you want in the folder they need to be placed in.
|
||||
If no instructions are provided for the script you want then simply follow the instructions given in [How do I use a compiled script?](#how-do-i-use-a-compiled-script)
|
||||
If no instructions are provided for the script you want then simply follow the instructions given in [How do I use a script?](#how-do-i-use-a-script)
|
||||
|
||||
Just keep in mind that this downloads a copy of this repository at the moment you download it.
|
||||
If a script is updated after you downloaded this repository and you want the new version then you will need to download this repository again.
|
||||
|
||||
## How do I use a compiled script?
|
||||
## How do I use a script?
|
||||
|
||||
[Follow the instructions in the documentation](https://plutonium.pw/docs/modding/loading-mods/#loading-existing-scripts-on-t6)
|
||||
|
||||
@ -30,32 +28,3 @@ If the script should only be loaded for the multiplayer mode then put it in `scr
|
||||
If the script should only be loaded for the zombies mode then put it in `scripts\zm`.
|
||||
|
||||
Note that you can use `map_restart` in the [console](https://plutonium.pw/docs/opening-console/) to quickly restart your current game and reload scripts.
|
||||
|
||||
## How do I compile a script?
|
||||
|
||||
<!---
|
||||
Replace with Plutonium's documentation instead when it's up-to-date
|
||||
--->
|
||||
|
||||
- Download [GSC Tool](https://github.com/xensik/gsc-tool/releases/latest)
|
||||
- Read the [instructions to compile a file](https://github.com/xensik/gsc-tool#usage)
|
||||
|
||||
It should look similar to this
|
||||
`gsc-tool.exe comp t6 "C:\Users\Resxt\AppData\Local\Plutonium\storage\t6\scripts\mapvote.gsc"`
|
||||
|
||||
If after opening the file you see that it has a lot of non readable characters this means that it was successfully compiled.
|
||||
|
||||
## What are compiled and source scripts?
|
||||
|
||||
Before downloading a script it's important to understand what compiled and source scripts mean.
|
||||
A source script is the script in a human readable form (a text file), this is how the script is written.
|
||||
A compiled script is simply a source script that has been compiled by a compiler to make it readable by the game.
|
||||
At the time of writing, T6 cannot read source scripts so you have to compile them to allow the game to read them.
|
||||
|
||||
So if you only want to use a script and you don't want to edit it or review its code then
|
||||
you can simply read [How do I use a compiled script?](#how-do-i-use-a-compiled-script).
|
||||
|
||||
All of my scripts always come as two files:
|
||||
|
||||
- script.gsc (compiled script, ready to be used)
|
||||
- script-source.gsc (source script, made to read the code and eventually edit it, cannot be read by the game, needs to be compiled)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
||||
#include maps\mp\_utility;
|
||||
|
||||
Init()
|
||||
{
|
||||
if (GetDvarInt("mapvote_enable"))
|
||||
{
|
||||
replaceFunc(maps\mp\gametypes\_killcam::finalkillcamwaiter, ::OnKillcamEnd);
|
||||
}
|
||||
}
|
||||
|
||||
OnKillcamEnd()
|
||||
{
|
||||
if (!IsDefined(level.finalkillcam_winner))
|
||||
{
|
||||
if (isRoundBased() && !wasLastRound())
|
||||
return false;
|
||||
|
||||
wait GetDvarInt("mapvote_display_wait_time");
|
||||
[[level.mapvote_rotate_function]]();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
level waittill("final_killcam_done");
|
||||
if (isRoundBased() && !wasLastRound())
|
||||
return true;
|
||||
|
||||
wait GetDvarInt("mapvote_display_wait_time");
|
||||
[[level.mapvote_rotate_function]]();
|
||||
|
||||
return true;
|
||||
}
|
@ -1,154 +0,0 @@
|
||||
/*
|
||||
All the credits for this script go to DoktorSAS for both the source code and for helping me figuring this out
|
||||
https://github.com/DoktorSAS/PlutoniumT6Mapvote/blob/master/Zombies/mapvote.gsc
|
||||
|
||||
menuSounds = array("zmb_meteor_activate", "zmb_spawn_powerup", "zmb_powerup_grabbed", "zmb_switch_flip", "zmb_elec_start", "zmb_perks_packa_ready");
|
||||
*/
|
||||
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
|
||||
Init()
|
||||
{
|
||||
if (GetDvarInt("mapvote_enable"))
|
||||
{
|
||||
replaceFunc(maps\mp\zombies\_zm::intermission, ::OnIntermissionStart);
|
||||
}
|
||||
}
|
||||
|
||||
OnIntermissionStart()
|
||||
{
|
||||
level.intermission = 1;
|
||||
level notify("intermission");
|
||||
|
||||
for (i = 0; i < level.players.size; i++)
|
||||
{
|
||||
level.players[i] thread player_intermission();
|
||||
level.players[i] hide();
|
||||
level.players[i] setclientuivisibilityflag("hud_visible", 0);
|
||||
|
||||
level.players[i] setclientthirdperson(0);
|
||||
level.players[i].health = 100;
|
||||
level.players[i] stopsounds();
|
||||
level.players[i] stopsounds();
|
||||
}
|
||||
|
||||
wait GetDvarInt("mapvote_display_wait_time");
|
||||
|
||||
[[level.mapvote_rotate_function]]();
|
||||
|
||||
for (i = 0; i < level.players.size; i++)
|
||||
{
|
||||
level.players[i] notify("_zombie_game_over");
|
||||
level.players[i].sessionstate = "intermission";
|
||||
}
|
||||
|
||||
players = get_players();
|
||||
i = 0;
|
||||
while (i < players.size)
|
||||
{
|
||||
setclientsysstate("levelNotify", "zi", players[i]);
|
||||
i++;
|
||||
}
|
||||
wait 0.25;
|
||||
players = get_players();
|
||||
i = 0;
|
||||
while (i < players.size)
|
||||
{
|
||||
setclientsysstate("lsm", "0", players[i]);
|
||||
i++;
|
||||
}
|
||||
level thread maps\mp\zombies\_zm::zombie_game_over_death();
|
||||
}
|
||||
|
||||
player_intermission()
|
||||
{
|
||||
self closemenu();
|
||||
self closeingamemenu();
|
||||
|
||||
level endon("stop_intermission");
|
||||
self endon("disconnect");
|
||||
self endon("death");
|
||||
|
||||
self.score = self.score_total;
|
||||
|
||||
self.spectatorclient = -1;
|
||||
self.killcamentity = -1;
|
||||
self.archivetime = 0;
|
||||
self.psoffsettime = 0;
|
||||
self.friendlydamage = undefined;
|
||||
points = getstructarray("intermission", "targetname");
|
||||
if (!isDefined(points) || points.size == 0)
|
||||
{
|
||||
points = getentarray("info_intermission", "classname");
|
||||
|
||||
location = getDvar("ui_zm_mapstartlocation");
|
||||
for(i = 0;i < points.size;i++)
|
||||
{
|
||||
if(points[i].script_string == location)
|
||||
{
|
||||
points = points[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (points.size < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (isdefined(self.game_over_bg))
|
||||
self.game_over_bg destroy();
|
||||
org = undefined;
|
||||
while (1)
|
||||
{
|
||||
points = array_randomize(points);
|
||||
i = 0;
|
||||
while (i < points.size)
|
||||
{
|
||||
point = points[i];
|
||||
if (!isDefined(org))
|
||||
{
|
||||
self spawn(point.origin, point.angles);
|
||||
}
|
||||
if (isDefined(points[i].target))
|
||||
{
|
||||
if (!isDefined(org))
|
||||
{
|
||||
org = spawn("script_model", self.origin + vectorScale((0, 0, -1), 60));
|
||||
org setmodel("tag_origin");
|
||||
}
|
||||
org.origin = points[i].origin;
|
||||
org.angles = points[i].angles;
|
||||
j = 0;
|
||||
while (j < get_players().size)
|
||||
{
|
||||
player = get_players()[j];
|
||||
player camerasetposition(org);
|
||||
player camerasetlookat();
|
||||
player cameraactivate(1);
|
||||
j++;
|
||||
}
|
||||
speed = 20;
|
||||
if (isDefined(points[i].speed))
|
||||
{
|
||||
speed = points[i].speed;
|
||||
}
|
||||
target_point = getstruct(points[i].target, "targetname");
|
||||
dist = distance(points[i].origin, target_point.origin);
|
||||
time = dist / speed;
|
||||
q_time = time * 0.25;
|
||||
if (q_time > 1)
|
||||
{
|
||||
q_time = 1;
|
||||
}
|
||||
org moveto(target_point.origin, time, q_time, q_time);
|
||||
org rotateto(target_point.angles, time, q_time, q_time);
|
||||
wait(time - q_time);
|
||||
wait q_time;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
Init()
|
||||
{
|
||||
level thread OnPlayerConnect();
|
||||
}
|
||||
|
||||
OnPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
Print(player.name + " GUID: " + player.guid);
|
||||
player thread OnPlayerSpawned();
|
||||
}
|
||||
}
|
||||
|
||||
OnPlayerSpawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
for(;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
Print(self.name + " GUID: " + self.guid);
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user