Page 1 of 1

Mine Trigger

Posted: Sat Jul 12, 2014 8:02 pm
by Kingpin
How do I make mines that set off when anyone steps on it?

Re: Mine Trigger

Posted: Sat Jul 12, 2014 8:05 pm
by RacoonLR
Kingpin wrote:How do I make mines that set off when anyone steps on it?
Aren't mines included by default in swbf2?

Re: Mine Trigger

Posted: Sat Jul 12, 2014 8:12 pm
by Kingpin
They are, but they only set off when the opposing team steps on it. I would like it for anyone who steps on it to explode.

Re: Mine Trigger

Posted: Sat Jul 12, 2014 8:20 pm
by Marth8880
[color=#FFFFFF]Weapon_Notes.txt[/color] wrote:EntityMine ("mine"):
GeometryName: model used for the mine
LifeSpan: maximum life time
Rebound: coefficient of restitution (like a grenade)
Friction: coefficient of friction (like a grenade)
ExplosionTrigger: explosion used when triggered
ExplosionExpire: explosion used when its lifespan expires
ExplosionDeath: explosion used when destroyed
TriggerContact: trigger when touched by an enemy
TriggerRadius: radius to search for enemies; the mine will trigger when an enemy inside this radius stops or moves away
SuppressRadius: radius to search for friendlies; the mine will not trigger when a friend is inside
The only parameter relating to the way the ordnance triggers seems to be TriggerContact, but I'm pretty sure setting it to 0 just makes it explode when its lifespan elapses. I'd try it anyways, though, just to be sure. ;)

Re: Mine Trigger

Posted: Sat Jul 12, 2014 8:33 pm
by MileHighGuy
I don't think it is triggercontact.The mines have to be on a different team. I saw this work in the hunger games during FFA mode, I was killed by my own mines because they were on a separate team.

Re: Mine Trigger

Posted: Sat Jul 12, 2014 9:26 pm
by Marth8880
MileHighGuy wrote:I don't think it is triggercontact.The mines have to be on a different team. I saw this work in the hunger games during FFA mode, I was killed by my own mines because they were on a separate team.
Image

Well then. :o Not sure how one would change the team of an ordnance, though it might be possible, I guess.

Re: Mine Trigger

Posted: Sat Jul 12, 2014 11:11 pm
by Noobasaurus
Off-topic: Why did I just watch that? I don't even know.

Re: Mine Trigger

Posted: Sat Jul 12, 2014 11:13 pm
by Kingpin
Marth8880 wrote:
MileHighGuy wrote:I don't think it is triggercontact.The mines have to be on a different team. I saw this work in the hunger games during FFA mode, I was killed by my own mines because they were on a separate team.
Image

Well then. :o Not sure how one would change the team of an ordnance, though it might be possible, I guess.

Either I ate something I should not have, or that video is real o_0

On-Topic: Bring fourth K, King of the Hungerith Gameiths! *blows horn*

Re: Mine Trigger

Posted: Sun Jul 13, 2014 6:25 am
by Anakin
Maybe something like affect friend??

btw what means
TriggerSingle = "0"
and
TriggerAll = "1"

Re: Mine Trigger

Posted: Sun Jul 13, 2014 9:32 am
by Marth8880
Nah, AffectFriend only works for emitter ordnance.

Re: Mine Trigger

Posted: Sun Jul 13, 2014 11:44 am
by Kingpin
Hm. I tried making him lay two mines, one from each team, but then it just exploded :P

That's alright, thanks for the help AND trippy 7 minutes of my life :)

Re: Mine Trigger

Posted: Sun Jul 13, 2014 11:51 am
by Marth8880
Wait, how are you determining the mine's team? Also, you'd probably want to set the team to neutral (0).

Re: Mine Trigger

Posted: Sun Jul 13, 2014 12:19 pm
by Kingpin
With the team set to neutral, neither sets it off.

Re: Mine Trigger

Posted: Sun Jul 13, 2014 12:21 pm
by Marth8880
:o Hmm. Set up a local team, make it so it views teams 1 and 2 as enemies, and set the mine's team to the local team.

Re: Mine Trigger

Posted: Sun Jul 13, 2014 12:53 pm
by Kingpin
Now my player explodes as soon as he lays it :(

Re: Mine Trigger

Posted: Sun Jul 13, 2014 1:24 pm
by Marth8880
Ah, yeah, makes sense. :p Since there's no real way to delay the trigger activation, you're going to have to either increase the MinStrength and MaxStrength for the dispenser so that the mine is thrown far enough away from the player, decrease the TriggerRadius, decrease the ordnance Velocity, or a combination of the three.

Edit: Actually, you *could* just make it so the unit dispensing the mine is immune to mines. :o

Re: Mine Trigger

Posted: Sun Jul 13, 2014 1:31 pm
by thelegend
Maybe change this lines in your mine's odf to:

Code: Select all

TargetEnemy             = "1"
TargetNeutral           = "1"
TargetFriendly          = "1"
I think it could work. I am not sure.

Re: Mine Trigger

Posted: Sun Jul 13, 2014 1:40 pm
by Kingpin
That's what I did before, but I exploded on myself :(

Re: Mine Trigger

Posted: Sun Jul 13, 2014 1:40 pm
by Marth8880
Those aren't valid parameters for ordnance ODFs.

Full list of parameters (i.e., the most useful doc in the world): http://www.secretsociety.com/forum/down ... meters.txt