[Weapon] Laser Trip-mine - Update: Version 3.0.0 (Now on blockland glass)

Author Topic: [Weapon] Laser Trip-mine - Update: Version 3.0.0 (Now on blockland glass)  (Read 7636 times)

NOTE: This thread is outdated. Go here instead https://forum.blockland.us/index.php?topic=310966.0

The last thread got too old to post in so I'm making a new thread

Laser Trip-mine
An advanced wall-mounted trap that detonates when its beam is broken.

       

Download (3.0.0)
Weapon_HL1Tripmine
Blockland Glass

How to place a mine:

  • Your mine must be placed on a brick.
  • There must be another wall no more than 32 studs away from the mine, in the direction the mine is facing.
  • There will be a 3 second wait while the mine charges up before it arms and the laser is displayed.
  • There will be a visual indicator telling you whether or not you can place your mine, green means it can be placed in this position, red means it cannot.

Commands:
/cleartripmines - clears all trip-mines.
/rebuildtripmine - reset all prefs to default values.

Prefs:
$Pref::Tripmine_UpdateSpeed - The speed at which the preview ghost updates. Default is 33 (30FPS).
$Pref::Tripmine_TripmineColor - Color of the trip-mine. RGBA value, default "0.25 0.50 0.25 1.00".
$Pref::Tripmine_LaserColor - Color of the laser. RGBA value, default "0.00 1.00 1.00 0.50".
$Pref::Tripmine_BeamWidth - Width of the laser beam. Default 0.5.
$Pref::Tripmine_StrictNormals - If set to true, players will only be able to place mines on cubes and not ramps or wedges. Default false.
$Pref::Tripmine_DeleteTime - Time before tripmine automatically deletes itself. If it's set to a value less than 0, trip-mines will never delete themselves. Default -1.
$Pref::Tripmine_TouchDet - If set to true, trip-mines will explode if a player touches them. Default true.
$Pref::Tripmine_MiniDespawn - If set to true, trip-mines will be deleted upon minigame reset. Default true.
$Pref::Tripmine_ExplosionScale - Scale of the trip-mine explosion. Default 1.
$Pref::Tripmine_InfUses - If set to false, trip-mines will be removed from the player's inventory upon use.

Defuse tool:
The quickest way to get rid of an inconveniently placed trip-mine is to shoot it or blow it up, but if this isn't an option, you can use the defuse tool to disarm the mine (at which point you can pick up the mine for use later).

To use the defuse tool, look at a mine and click on it with the defuse tool. This will begin a small minigame. In order to successfully defuse the mine, you must click the trip-mine 3 times without setting it off. Upon wrenching the trip-mine, you must wait one second before you can wrench the mine again. Any sooner, and the mine will detonate. If you wait too long (1.5 seconds), the mine will detonate.

Trip-mine colors:
The $Pref::Tripmine_TripmineColor and $Pref::Tripmine_LaserColor prefs are available to server hosts to customize the look of their trip-mines. For example, if you wanted to make a black tripmine with a low-vis red laser, you would type this into the console:
Code: [Select]
$Pref::Tripmine_TripmineColor = "0.2 0.2 0.2 1";
$Pref::Tripmine_LaserColor = "1 0 0 0.1";
The changes will take effect immediately, except for the trip-mine item, image and icon. These will inherit color from $Pref::Tripmine_TripmineColor after the server is restarted.



Other advantages over V2:
- Idle mines no longer spam schedules, they do nothing, so they shouldn't have any effect on performance.
- Trip-mines can be placed on any brick surface. Whether or not a trip-mine looks good on a brick surface is largely dependent on how the brick was made.

Script_ObstructRadiusDamage:
I HIGHLY RECOMMEND YOU USE THIS ADD-ON! It is a good add-on and will prevent trip-mines from blowing up people on the wrong side of the wall.
https://forum.blockland.us/index.php?topic=242211.0

Download (3.0.0)
Weapon_HL1Tripmine
Blockland Glass

If this crashes your server or burns your house down or something please let me know. Legacy versions can be found here.

« Last Edit: June 22, 2017, 04:30:45 AM by Rally »

-reserved-
wait why do people reserve in these add-on threads?

i waited this for long, nice!

-reserved-
wait why do people reserve in these add-on threads?
why did you do it if you had no idea why handicapo

#RenameToSLAMOrRiot

i waited this for long, nice!

Hah, you missed the -reserved-


muh richard
i suppose its a literal pusillanimous individual destroyer


needs the idle animation where your player keeps adjusting the lens

needs the idle animation where your player keeps adjusting the lens
that's my favorite animation




This is the HL1 laser tripmine, not the HL2 SLAM. Stop being friends.