MOH Central

Medal of Honor Series Forum => MOHAA Series: General => Topic started by: LeBabouin {sfx} on October 29, 2015, 06:26:27 PM

Title: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on October 29, 2015, 06:26:27 PM
What the entdef says:

/*QUAKED trigger_multiple (1 0 0) ? x x NOT_PLAYERS MONSTERS PROJECTILES x x DAMAGE
..........
If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters
If PROJECTILES is set, the trigger will respond to projectiles (rockets, grenades, etc.)
If DAMAGE is set, the trigger will only respond to bullets


So I try:

    local.trig = spawn trigger_multiple spawnflags "128"
    local.trig.origin =  ( 520 1424 -76 )
    local.trig setsize ( -58 0 -40 ) ( -28 0 10 )
    local.trig wait 0
    local.trig delay 0
    local.trig thread doStuff 10


I've set it to 128 and it does react to bullets, that's what i want, but also to projectiles, even bash, didn't try taunt though, I have four of them  and they all react the same. Is there any secret to know or maybe DAMAGE rather means any damage and there's actually no flags for bullet only?


Title: Re: [AA] sapwnflags 128 trigger
Post by: Cobra {sfx} on October 30, 2015, 11:24:33 AM
Try like this ...

local.trigger = spawn trigger_multiple "spawnflags" "128" "health" "100"
local.trigger.origin = local.origin
local.trigger setsize ( -16 -16 0 ) ( 16 16 96 )
local.trigger.rotatedbbox = 1
local.trigger.angles = local.angles


I used that on my pop up bad guys, i only ever tried bullets on it though
Title: Re: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on October 30, 2015, 03:46:29 PM
Same but I keep it for further use hehe Tya Cobra.
My conclusion is it doesn't react to projectiles actually but to damage. Throwing a nade thru it doesn't trigger, only explosion and explosion radius wide :(
128 is a myth
Title: Re: [AA] sapwnflags 128 trigger
Post by: Cobra {sfx} on October 30, 2015, 04:30:23 PM
Did you try self immune bash etc etc?
Not sure if it will work but seems to work with armour :)
Title: Re: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on November 01, 2015, 08:47:00 AM
i admit having thought of immune but moved it away for now as in the meantime i spawned other 128 flagged triggers, and depending on i dont know what, they randomly either react to bullets + projectiles or to projectiles only. This is total anarchy and i'm far to identify what makes them differ in their behaviour.
Im actually trying to open doors with bullets hitting the door locker and using triggers because implementing the native dorrs properties gave no results at all from Scripting. So i have a 128 trigger on each side of the door and when hit, i make the trigger open the door and this works great for 50% of the doors, if i accept to let projectiles open doors too.

Working one:
(http://tof.canardpc.com/preview/3eb7bbb7-17a0-44ec-8de3-e82a665b7b9c.jpg) (http://tof.canardpc.com/view/3eb7bbb7-17a0-44ec-8de3-e82a665b7b9c.jpg) (http://tof.canardpc.com/preview/89771793-84fe-4c6c-8de5-a7ae3a355a5c.jpg) (http://tof.canardpc.com/view/89771793-84fe-4c6c-8de5-a7ae3a355a5c.jpg)

not working:
(http://tof.canardpc.com/preview/0381b4ea-99de-4625-b7a2-6b71869b42f6.jpg) (http://tof.canardpc.com/view/0381b4ea-99de-4625-b7a2-6b71869b42f6.jpg) (http://tof.canardpc.com/preview/907124e2-73b4-44c9-9bd6-7a6558acfef7.jpg) (http://tof.canardpc.com/view/907124e2-73b4-44c9-9bd6-7a6558acfef7.jpg)
Title: Re: [AA] sapwnflags 128 trigger
Post by: Cobra {sfx} on November 01, 2015, 09:31:48 AM
Thats a lot of work, is your "USE" key broken? :P lol

I think if you have the triggers thread to an immune thread it might work, using triggers with bullets does seem random, sometimes they dont seem to detect the bullet hitting it.

The only thing with a health trigger is when its dead its dead, you have to keep respawning a new trigger ... i helped Pac with that one not long ago :)
Title: Re: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on November 02, 2015, 05:52:45 AM
Not that much doors in AA. Yes i find it boring opening doors normally :)
I found the origin of the trigger must be inside the trigger to completely react to bullet, as you first suggested :). Also i found it more realistic to let projectiles open doors too, so my current problem is solved , though i will keep on searching for the 128 not firing for bullets only.
Thanks again Cobra, sorry to make you out of your retirement :)
Title: Re: [AA] sapwnflags 128 trigger
Post by: Cobra {sfx} on November 02, 2015, 09:28:39 AM
Haha, no worries mate, if i can help or remember something ill post about it dont worry :)
Title: Re: [AA] sapwnflags 128 trigger
Post by: PacRac {sfx} on November 03, 2015, 07:39:16 AM
Cobra is right. You just need to add immune commands to it's triggers.
Just attribute targetname's and then just add the immune lines, ex:
$door1 damage
$door1 immune grenade
$door1 immune bash
$door1 immune explosion
$door1 immune rocket

This way doors will only open with bullets.

And u dont need to use the spawnflags 128. just use the immune command.

Hope this helps ;)
Title: Re: [AA] sapwnflags 128 trigger
Post by: =[M.A.W]=DoubleKill on November 04, 2015, 10:02:44 AM
I think you could put the door opening automaticaly when someone reach the door because i remember see the commands on the documentation of the game.

If i get time and manage to do it i will post the script here for you.
Title: Re: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on November 17, 2015, 03:21:53 AM
Quote from: PacRac {sfx} on November 03, 2015, 07:39:16 AM
Cobra is right. You just need to add immune commands to it's triggers.
Just attribute targetname's and then just add the immune lines, ex:
$door1 damage
$door1 immune grenade
$door1 immune bash
$door1 immune explosion
$door1 immune rocket

This way doors will only open with bullets.

And u dont need to use the spawnflags 128. just use the immune command.

Hope this helps ;)

Sorry Pac for not havind thanked and concratulate you in time, i  had a pause with the doors for a couple of days.
This is awesome and philosophical! So happy to learn something new and important for scripting :)
Actuallh i let the explosions open ghe doors now, that sounds about normal..

*********edit: i will use bash immunity for metal doors though. Thank you again!
Title: Re: [AA] sapwnflags 128 trigger
Post by: LeBabouin {sfx} on November 17, 2015, 05:49:37 AM
Quote from: =[M.A.W]=DoubleKill on November 04, 2015, 10:02:44 AM
I think you could put the door opening automaticaly when someone reach the door because i remember see the commands on the documentation of the game.

If i get time and manage to do it i will post the script here for you.

Hehe i had this idea too but that's not as fun as pumping  doors while running :)
I will test your script anyway for fun if you release it.