Jump to content

Weapon Script


SpeedyB64

Recommended Posts

What I am doing is making remote mines, so there is no specific target. Is there a way to detect if the player fires a gun (Any gun) Then have the script check if you have the right weapon equipped?

 

For now I will use an item in the Aid section as a detonator.

Link to comment
Share on other sites

You don't need a "target" for what i suggest. You can make the weapon-related script change a quest variable, and have the mines "listening" for the quest variable. The explosion method just needs a large enough explosion to catch at least one actor/object so the effect script happens, and better if the projectile is set to fall to the ground in front of the player (largely affected by gravity).

For the gamemode script, it could be an effect tied to the weapon via onequip scripting, that way it'll only be running when the weapon is equipped.

As far as i know, there's no way to "know" if a weapon has been fired.

Link to comment
Share on other sites

All right. I have decided to use an inventory item instead since its a lot simpler and more foolproof. The problem i have now is that when i set off the mines if there is a mine in a container the game will CTD, but only if they where in the container from the start if I put one in a container it works fine.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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