mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 20:52:54 +00:00
Create remove_heavy_weapon_slow
This commit is contained in:
parent
61f14dab32
commit
b110613f79
@ -57,6 +57,14 @@ This checks for bots kills and deaths every 30 seconds. If they didn't do any ki
|
|||||||
Obviously a better way to do this would be checking for their positions or removing bad spawns on the map or creating waypoints for the map.
|
Obviously a better way to do this would be checking for their positions or removing bad spawns on the map or creating waypoints for the map.
|
||||||
This is just a quick temporary solution that works for me.
|
This is just a quick temporary solution that works for me.
|
||||||
|
|
||||||
|
## remove_heavy_weapon_slow.gsc
|
||||||
|
|
||||||
|
Set back your speed scale to default whenever you have an heavy weapon equipped.
|
||||||
|
Whenever you have an LMG gun or heavy sniper like a Barrett your speed will be slower than with most weapons.
|
||||||
|
This script makes it so that no matter the weapons you have in your class your speed will be normal/default.
|
||||||
|
The script doesn't modify the player's speed, instead it modifies the speed scaling (sets it back to 1) so it's safe to use with modified `g_speed`.
|
||||||
|
The speeds were tested/monitored with this [speed meter script from quaK](https://github.com/Joelrau/IW5p_DeathRun/blob/aaa9a4231d338b765d8b0fc8b06825b3a6d2a413/plugins/simplevelometer.gsc)
|
||||||
|
|
||||||
## show_text_on_first_spawn.gsc
|
## show_text_on_first_spawn.gsc
|
||||||
|
|
||||||
Display a text to a player when it's the first time he spawns in a match.
|
Display a text to a player when it's the first time he spawns in a match.
|
||||||
|
52
small_scripts/remove_heavy_weapon_slow.gsc
Normal file
52
small_scripts/remove_heavy_weapon_slow.gsc
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#include maps\mp\_utility;
|
||||||
|
|
||||||
|
Init()
|
||||||
|
{
|
||||||
|
InitRemoveHeavyWeaponSlow();
|
||||||
|
}
|
||||||
|
|
||||||
|
InitRemoveHeavyWeaponSlow()
|
||||||
|
{
|
||||||
|
level thread OnPlayerConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerConnect()
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
level waittill("connected", player);
|
||||||
|
|
||||||
|
player thread OnPlayerSpawned();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerSpawned()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
self waittill("changed_kit");
|
||||||
|
|
||||||
|
self SetMoveSpeedScale(1);
|
||||||
|
|
||||||
|
self thread OnPlayerWeaponSwitch();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
The move speed scale is reset whenever we switch weapons so we need to re-apply it on weapon change
|
||||||
|
*/
|
||||||
|
OnPlayerWeaponSwitch()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
self waittill( "weapon_change", newWeapon );
|
||||||
|
|
||||||
|
wait 0.05; // For some reason this is needed otherwise when you fully stop and switch weapon it won't apply
|
||||||
|
|
||||||
|
self SetMoveSpeedScale(1);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user