SpeedyB64 Posted April 6, 2009 Share Posted April 6, 2009 Does anyone know how to make a script run when you fire the weapon. It will be used like a remote control type thing. Link to comment Share on other sites More sharing options...
TGBlank Posted April 6, 2009 Share Posted April 6, 2009 I don't know if you can do something when you "fire", but you can probably either use a gamemode actor effect that listens for the firing key, or a weapon -> invisible projectile -> invisible explosion -> script. Link to comment Share on other sites More sharing options...
SpeedyB64 Posted April 6, 2009 Author Share Posted April 6, 2009 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 More sharing options...
TGBlank Posted April 6, 2009 Share Posted April 6, 2009 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 More sharing options...
SpeedyB64 Posted April 6, 2009 Author Share Posted April 6, 2009 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 More sharing options...
TGBlank Posted April 6, 2009 Share Posted April 6, 2009 They shouldnt be "listening" for the trigger unless they have been "set' Link to comment Share on other sites More sharing options...
SpeedyB64 Posted April 6, 2009 Author Share Posted April 6, 2009 Yah I fixed it by making it so that you arm the mines that you have placed. They are extremely fun to use :biggrin: Just need to polish it up a bit. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.