Jump to content

Mines in a trigger area (desc makes more sense)


StealthDick

Recommended Posts

also these are just normal frag mines

 

I imagine you can have a script check for a custom named mine in the PC's inventory, have a trigger box that runs once the player enters it and then does a count of the custom named mine and detects when a player places it as the inventory count of the mine goes down. Likely an easier way exist to do it though.

it's for a quest and this is how i want the scenario to go.

PC gets asked to place mines in a road, PC drops the mines inside the trigger box, quest updates, another npc comes by and steps on them.

Link to comment
Share on other sites

also these are just normal frag mines

 

I imagine you can have a script check for a custom named mine in the PC's inventory, have a trigger box that runs once the player enters it and then does a count of the custom named mine and detects when a player places it as the inventory count of the mine goes down. Likely an easier way exist to do it though.

it's for a quest and this is how i want the scenario to go.

PC gets asked to place mines in a road, PC drops the mines inside the trigger box, quest updates, another npc comes by and steps on them.

Link to comment
Share on other sites

I recommend the Activator method for this. The reason is that if they're just arming regular frag mines, a player can place the mines and the quest can update, and then the player can shoot the mines or Malcolm Holmes might run on them or whatever. So I would just make an entire patch of ground an Activator, then when the player activates it, either all three mines are enabled (and aren't really live), or you can update a variable and have the player activate the ground once per mine. Then when the NPC that is about to meet their untimely fate enters that activator/trigger, the mines are disabled, several frag explosions are placed, and the NPC is killed via KillActor Player 0.

 

Other choice is just to make the quest update when the NPC dies. You can have the player fail the quest if the NPC is not killed in a specific location or specific way if you want.

 

Because other than these two things, you are going to have a real headache accounting for everything, is the way I see it.

Link to comment
Share on other sites

also these are just normal frag mines

 

I imagine you can have a script check for a custom named mine in the PC's inventory, have a trigger box that runs once the player enters it and then does a count of the custom named mine and detects when a player places it as the inventory count of the mine goes down. Likely an easier way exist to do it though.

it's for a quest and this is how i want the scenario to go.

 

PC gets asked to place mines in a road, PC drops the mines inside the trigger box, quest updates, another npc comes by and steps on them.

 

yeah i just said f*#@ it and made an activator but i ran into another problem.

 

I set up a bunch of projectile mines that get enabled through an activator except they just dont spawn, here is the activator script I made.

 

scn aaaMineDeployerScript
short button
begin onactivate
If aaaQuestName.bHEChoice == 1
showmessage aaaMineMessage01
elseif aaaQuestName.bHEChoice == 2
showmessage aaaMineMessage02
endif
endif
END
begin menumode 1001
set button to getbuttonpressed
if (button ==0)
MineSpawnA.enable
MineDeployerREF.disable
showmessage aaaMineMessage03
player.additem WeapNVFragMine 4
elseif (button ==1)
MineSpawnA.enable
MineSpawnB.enable
MineDeployerREF.disable
showmessage aaaMineMessage04
endif
END

MineSpawnA & B are Frag Mine projectiles that are initially disabled and are enable parents too multiple other mines

MineDeployerREF is the activator.

 

It all works in game the mines just dont spawn.

Link to comment
Share on other sites

I would again just fake the mines and use the trigger to blow up your NPC.

 

For messages, MenuMode doesn't work that well and I would use GameMode if you're doing it with vanilla functions, but I will use JIP LN's superior message box function over that every time:

https://geckwiki.com/index.php/MessageBoxExAlt

 

It's much cleaner and doesn't require a whole message to be placed in some other category in the GECK.

 

For example:

scn aaaMineDeployerScript

Begin OnActivate 
    If IsActionRef Player
        If aaaQuestName.bHEChoice == 1
            MessageBoxExAlt MineMessageUDFScript1 "^Mines from that quest you got^I see you got them minez, want u 2 deploy them??|Yes|No"
        ElseIf aaaQuestName.bHEChoice == 2
            MessageBoxExAlt MineMessageUDFScript2 "^Mines from that quest you got^I see you got them minez, want u 2 deploy them??|Yes|No"
        EndIf
    EndIf
End
scn MineMessageUDFScript1

int	iButton

begin Function {iButton}
    if iButton == 0
        MineSpawnA.enable
        MineDeployerREF.disable
        showmessage aaaMineMessage03
        player.additem WeapNVFragMine 4
    elseif iButton == 1
        MineSpawnA.enable
        MineSpawnB.enable
        MineDeployerREF.disable
        showmessage aaaMineMessage04
    endif
end

I'm a little unclear on what your script is supposed to do, so don't take that as gospel or anything, but it's something that should help you along if you want to use this function (which if you want to continue modding with messages, save yourself a lot of trouble and start now).

 

Edit: Obviously, if you want to use JIP LN functions, you'll need to get JIP LN from the Nexus, which requires NVSE, and if you have NVSE but aren't using JIP LN yet, NVSE absolutely must be up to date.

Edited by EPDGaffney
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...