Jump to content

Mod Help - Quest Stage


Plarux

Recommended Posts

I was wondering if there is a way to require an NPC to be killed by a certain weapon in order for the quest to complete the stage & go on to the next. Anyone know how?

A scripted solution would probably give you the most flexibility.

 

You could make them essential (tick the essential check box) and either add a script based object effect or simply add the script itself to teh weapon. The script should have a conditional check to filter out everything except the NPC (GetIsId or GetIsReference). Then you can mess around depending on what effect you want. Have it SetEssential 0 to make the NPC mortal and the player can begin reducing the opponents health, or KillActor to kill him/her off with one blow of the chosen weapon etc. You can have another script running to periodically restore the essential flag if it's a longer battle and you want most or all the damage to come exclusively from the weapon. If you use a script based solution, you will have a lot of flexibility in regard to the weapons behavior and effect on the npc.

 

Another option, if you don't like the behavior of the essential flag (the npc getting up after being knocked out for a sec), is to give the npc bookoo health and add a script or OE (getID, damageAV health) that works akin to emp weapons. If the ID is true (it's the npc) you can add whatever damage you want, depending on how many hit or hits you want to take the npc down.

Link to comment
Share on other sites

 

I was wondering if there is a way to require an NPC to be killed by a certain weapon in order for the quest to complete the stage & go on to the next. Anyone know how?

A scripted solution would probably give you the most flexibility.

 

You could make them essential (tick the essential check box) and either add a script based object effect or simply add the script itself to teh weapon. The script should have a conditional check to filter out everything except the NPC (GetIsId or GetIsReference). Then you can mess around depending on what effect you want. Have it SetEssential 0 to make the NPC mortal and the player can begin reducing the opponents health, or KillActor to kill him/her off with one blow of the chosen weapon etc. You can have another script running to periodically restore the essential flag if it's a longer battle and you want most or all the damage to come exclusively from the weapon. If you use a script based solution, you will have a lot of flexibility in regard to the weapons behavior and effect on the npc.

 

Another option, if you don't like the behavior of the essential flag (the npc getting up after being knocked out for a sec), is to give the npc bookoo health and add a script or OE (getID, damageAV health) that works akin to emp weapons. If the ID is true (it's the npc) you can add whatever damage you want, depending on how many hit or hits you want to take the npc down.

 

 

I'm relatively new to the GECK, but I think I get the concept of what're talking about. Correct me if I'm wrong, but you're suggesting I make a script for the weapon that only allows it to do damage to a selected NPC? I'm not the best at scripting, so I wouldn't really know where to start. If there was something in the game that I could look off of, I'd probably be able to tweak it to what I need. Anyways, do you think you could show me an example script of what it might look like for each of those cases?

 

Here's what I can think of off the top of my head:

 

scn NPCweapon

 

Begin onEquip

 

GetIsReference NPC000

 

set Essential to 0

 

ENDif

 

End

 

This would go on the weapon, and initially the NPC would be an essential one. After equipping the weapon the NPC becomes mortal and the player can kill said NPC. (Hoepfully this script is correct) To ensure the player wouldn't run into the NPC and not be able to kill it, I could set the NPC to be disabled until a certain part of the quest.

Edited by Plarux
Link to comment
Share on other sites

I'd swap "Begin OnEquip Player" for "Begin OnEquip". It's probably unlikely a npc will get the weapon, but just in case. On the other hand you might want it to be possible to hand off the weapon to a companion, if so ignore that suggestion.

 

Don't worry about getting the id/ref, you don't need it for this use case scenario (you don't have a condition). Set Essential will work on the base form. So it would be "SetEssential myBossCritter 0". You won't need an endIf since you don't have an if statement. Then I'd add;

 

Begin OnUnequip Player

SetEssential MyBossCritter 1

End

 

That way if the player unequips the weapon and tries to finish of your boss critter with another weapon, s/he won't get very far.

 

 

so;

Scn NPCweapon

 

Begin OnEquip Plyayer

SetEssential MyBossCritter 0

End

 

Begin OnUnequip Player

SetEssential MyBossCritter 1

End

 

You shouldn't have any problem running the script (well the SetEssential function) on a disabled ref since it functions on the base form.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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