Dan7e Posted June 18, 2009 Share Posted June 18, 2009 Hi there! I'm trying to get a small mod to work and for this I need to add a script to an ammunition. For example I'd like to manage that, when You click on an ammunition, a message window'd pops up. Does anyone has ideas how I could do that? I know in geck there's no way to add script, but I wonder someone has managed to find a solution. Helps would be greatly appriciated. Cheers,Dan7e Link to comment Share on other sites More sharing options...
Stewb Posted June 18, 2009 Share Posted June 18, 2009 i can think of one, but it's an annoying way of dealing with it. A perk, hidden if you don't want people to know it's there, added to the player with an "Entry Point" "On Activate" for when ammo is activated. Just add ammo to a formlist and get the perk to check if the activated item is in the list. Then it will automatically run the script when the ammo is activated, the script being the one you type in correct area of the perk window. Like i said it's annoying having hidden perks running in the background, but it's the only way i can think of to get your script running on activation of ammo. Entry Point Info Link to comment Share on other sites More sharing options...
Dan7e Posted June 18, 2009 Author Share Posted June 18, 2009 Thanks very much, Stewb! I'll give it a try. Cheers,Dan7e Link to comment Share on other sites More sharing options...
TGBlank Posted June 18, 2009 Share Posted June 18, 2009 Won't work. OnActivate triggers when the item is in the floor and you press the activate key (E by default). For 'inventory' activating, you want OnEquip, sadly, there is no entry point for onequip. So, you'll need to think of a different way to do what you want that doesn't involve clicking on the ammo. Link to comment Share on other sites More sharing options...
Dan7e Posted June 19, 2009 Author Share Posted June 19, 2009 I see. Thats a shame.Thanks anyways your help, guys. Cheers,Dan7e Link to comment Share on other sites More sharing options...
Stewb Posted June 19, 2009 Share Posted June 19, 2009 how about a scripted container then, if you can add a container to the player's inventory? like putting all your ammo in there and when you activate the container to take it out you get the message window? Sorry don't know what your planning so this is the best alternative i can think of. Of course it would mean a big script to account for all ammo types and to remove and add the correct amount from the locker and add to the player. Thx TG, i thought he/she just meant ammo found on the floor. My bad reading skills there :( Link to comment Share on other sites More sharing options...
Dan7e Posted June 19, 2009 Author Share Posted June 19, 2009 I think I've found a solution (still a theory, I didn't have the time to check it).Basically I make an activator, or a amisc item (like the bobbleheads), which has the ammunitions world model(in this case mini nuke), and write a script, which runs when I activate the ammo's world model. It's not as gentle as while in the inventory, but I think It'll do my trick.My plan would be it picked up as an ammunition, or a mine (I've found a mod that makes a mini nuke equippable, and I'm trying to extend it a little bit) :) Link to comment Share on other sites More sharing options...
TGBlank Posted June 19, 2009 Share Posted June 19, 2009 onequip runs when you click it on the inventory, if you're using a misc item, you can script it and use the onequip block. Link to comment Share on other sites More sharing options...
deliverance6 Posted June 19, 2009 Share Posted June 19, 2009 what we really...really..REALLY need is an "OnFired" referance -.-' but since thats nbever going to happen.... you can try scripting the gun instead of the ammo, may turn out easier (think of the staff that turns people into sheep from Oblivion) and then your ammo remains normal, but your the gun is actually casting a spell to do the effect you desire. but as i dont know what your trying to script your ammo to do, i cant promise this'd be the best solution, but its more likely to happen than scripted ammo... **Ofc, you could just add an "Begin OnTouch" to your ammo, but then that'd kill the engine quiet badly ^^ Link to comment Share on other sites More sharing options...
Dan7e Posted June 27, 2009 Author Share Posted June 27, 2009 Hi Guys!Sorry for the late reply. I have found a mod which managed to do exactly what I was trying to achieve.No, however I stepped into another, even more bothering problem. I write it down here, but if you suggest I open up a new topic, instead continuing this one.So, the problem is crash on save, when I have a note in my inventory. Specifically, based on the original schematics, I made a completely new schematic entry for the cut-out Cryolator, because I haven't found it anywhere. So, I placed its' note at the alien crashsite (just to be specific). Before I got it I could save anywhere, but after I picked up the note, I still could save in the cell, but when I left, the recon craft tetha(or something), every time I tryied to save, or enter with autosave, the game crashed to desktop. It only happens when I have the note. What could the problem be? Even it crashed, when I used craft and added it to its' dialog options, instead of the original list. Cheers,Dan7e Link to comment Share on other sites More sharing options...
Recommended Posts