Author Topic: [Weapon] Laser Trip-mine - Update: BETA RAMP FUNCTIONALITY (2.0.0)  (Read 12759 times)

This is technically part of the Half-Life 1 stuff I'm working on, but I don't think any trip mine add-ons exist yet so I'll release it separately.

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

       

How to place a mine:

  • Your mine must be placed on the flat side of a brick. It cannot be placed on wedges.
  • 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.
  • If you place a mine in an invalid position, you will hear an error sound (V2 only)

The maximum effective range of the trip-mine is 16 studs. The instant-kill radius is ~8.5 studs. Keep this in mind when placing trip-mines. Remember: trip-mines will do damage to you as well as others.

You can place mines on the floor and ceiling as of update 1.0.3.
You can place mines on ramps as of update 2.0.0.

Features:

  • Laser Beam: Once successfully placed, it produces a laser beam from the lens to the nearest wall it's facing.
  • One use per item: Once successfully placed, it will be removed from the player's inventory. The player can hold multiple. This can be toggled on and off as of 1.0.3, but I recommend you leave it off for most occasions.
  • Per-player mine limitations: Uses an RTB pref, the host can set the maximum amount of mines a single player is allowed to have placed at one time. If this limit is exceeded, the oldest mine is deleted.
  • Automatic despawning: Uses an RTB pref, mines will automatically despawn after a certain amount of time after being placed. Set this to -1 if you do not want them to disappear (can only be set to -1 in v2, not recommended)
  • Controlled detonation: You can shoot the mine to blow it up from a safe distance. Mines will also explode if you detonate a grenade next to them or any other weapon that has brickRadiusDamage. Due to this, if multiple mines are placed in proximity, they will all explode at once when one is tripped. Stack mines for a forgetload of damage.
  • Lag Failsafe: I stress tested the schedule loops on my server, but as someone who is new to Torque, it is possible I may of unintentionally left it susceptible to abuse. Use /cleartripmines to clear all mines on the server. Remember not to set "Max Mines Per Player" too high, and try to keep the despawn time low.
  • Explosion Preferences: If the explosion/damage radius is too high or too low for you, you can now change the explosion scale via an RTB pref. (added in V1.0.1)
  • Detonate on touch: By default, the mine will explode if a player collides with it. This can be turned off via a new RTB pref. (added in V1.0.2)
  • Defusing: If you're too close for comfort, you can defuse armed trip mines with the Pipe Wrench and pick them up after. This feature can be turned off in RTB prefs. Off by default. (added in V1.0.4) (changed to Pipe Wrench in V2.0.0)
  • Beam width: If you want your beams to be thicc you can make them bigger. If you want your beams to be real hard to see, you can make them smaller. If you want them to be completely invisible, you can do that too. Can be found in RTB prefs. (added in V1.0.4)
  • Minigame settings: As of 2.0.0, trip mines will despawn after the minigame resets.

Download (1.0.4 Stable)

Weapon_HL1Tripmine [507 KB] - Updated 6/5/16 - 5:51:37AM forum time


Download (2.0.0 Beta)

Weapon_HL1Tripmine [513 KB] - Updated 7/30/16 - 4:43:54 AM forum time


Download (2.0.1)

http://www.mediafire.com/file/otph8ggq2f8ae19/Weapon_HL1Tripmine.zip  - Updated 12/22/16

Disclaimer: Despite rigorous testing, this is a pretty advanced weapon and might be broken in some way. Please do not hesitate to report bugs, lag and exploits, or recommend better/safer/faster code.

Changelog
1.0.0 - Initial release
1.0.1 - Added explosion scale RTB pref
1.0.2 - Added "Detonate on Touch" RTB pref
1.0.3 - Added roof and ceiling functionality. Added RTB pref to allow infinite uses.
1.0.4 STABLE - Added defusing and beam width options
2.0.0 BETA - Added ramp functionality
« Last Edit: December 22, 2016, 05:51:07 PM by Rally »


>no floor and ceiling


Wow, this is wonderful! A lot better that common used C4. We all were need an advanced thing such like this. Will you make a better version of C4?

Could you make the mines easier to stand on so people have an alternative way of sneaking past them? Technically you can stand on a mine if it's placed close enough to a floor and you walk onto it, but otherwise, it's too sensitive and just explodes

Not sure if that's actually intentional, but it is neat, and how if you do manage to get on a mine and then jump, landing back on it will also explode it

Could you make the mines easier to stand on so people have an alternative way of sneaking past them? Technically you can stand on a mine if it's placed close enough to a floor and you walk onto it, but otherwise, it's too sensitive and just explodes

Not sure if that's actually intentional, but it is neat, and how if you do manage to get on a mine and then jump, landing back on it will also explode it

That's an easy change, I've added an RTB pref that allows you to toggle the detonate on touch function. Updated link is in the OP
What you've described is kinda strange though. Static shape collision is really goofy sometimes.

Wow, this is wonderful! A lot better that common used C4. We all were need an advanced thing such like this. Will you make a better version of C4?

Lol I forgot the C4 add-on existed. What changes are you looking for?

>no floor and ceiling

Once I figure out how to do vector math I'm going to add floor, ceiling and ramp functionality. Might be a while though.

it reminds me of a polaroid camera or a radio for some reason

rally, remember %normal from projectiledata on collision? you should be able to use that to do ramps and ceiling/floor with minimal editing, assuming %normal gives the angle of the side collided against in custom dts collisionboxes.

rally, remember %normal from projectiledata on collision? you should be able to use that to do ramps and ceiling/floor with minimal editing, assuming %normal gives the angle of the side collided against in custom dts collisionboxes.

I've been experimenting with it for a bit, but I'm confused as forget

The rotation for the static shape object is a field in the form of "x y z amount", so to rotate the mine to face north would be "0 0 1 90". But the normal is a 3f value, a vector, and for north it would be "0 1 0".

How would I convert the vector "0 1 0" to a value like "0 0 1 90"?

Lol I forgot the C4 add-on existed. What changes are you looking for?

This just reminds me when you place c4 and it allows you use two modes - countdown timer and remote detonation.

Looks a bit like the one from payday 2

give gramma some sugar

New Update
Updated link is in the OP



Changes:
- You can now place trip mines on the floor and the ceiling. Same rules apply.
- You can now place more than one mine per item. Turn on "Infinite uses" in your RTB prefs to do so.
« Last Edit: June 04, 2016, 01:55:12 PM by Rally »

dood this is amazing

you're on a roll here, wow

so thats why you made the rotation mod help thing!