EPDGaffney Posted March 23, 2018 Share Posted March 23, 2018 I had a feeling I should have checked earlier. Gonna put this down for a bit, getting frustrated.Haha, well, the GECK tends to have that effect on people. So, just use the shotgun trap that's already in the GECK. https://prnt.sc/ivfgqjhttps://prnt.sc/ivfhs8https://prnt.sc/ivfialhttps://prnt.sc/ivfikxhttps://prnt.sc/ivfjo2 Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 23, 2018 Share Posted March 23, 2018 (edited) Console, yeah. Just rename it like a file in Windows Explorer: slowly double-click its name in the Cell View window. Then type something easy to use in a console command. That or drop an activator in Goodsprings or some place, and give it a script that moves the player to your test cell, which is more work now but less work in repeated tests. Either way works. That script will work on anything (as long as it can be moused over, meaning it needs collision), but you need the object type to be able to take scripts, which Static can't. The model has collision, so that's not a problem. But you want it to be an Activator type I would think. You could go crazy and make it a few other types, but Activator is the most sensible here. Edit: I'm an idiot. You can just make a new door in the middle of Goodsprings and not have to script anything. Also, I think you may have an easier time of it calculating things with the test gun facing directly along the X or Y axis. Even more important, you may wish to duplicate the BB Gun and turn down its spread all the way, to control the experiment a bit more. You will then need to paste the ID of that new weapon into your script instead of WeapBB or whatever it was. Edited March 23, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
LonesomeCoyote Posted March 23, 2018 Author Share Posted March 23, 2018 I've only used CK for making scripts and rebuilding navmeshes.Okay, so I found the shotgun trap shell, do I have to place the weapon inside it and lock it to it somehow? What's to stop the player from just taking the gun instead of Activating it? Link to comment Share on other sites More sharing options...
LonesomeCoyote Posted March 23, 2018 Author Share Posted March 23, 2018 Do I even need the shell? Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 23, 2018 Share Posted March 23, 2018 Well, I've heard that the 1st-person models you're talking about have the type of collision usually associated with clutter or movable statics, so if you run into problems, just use the trap shotgun model from the Activator already in the game. The type of collision (chiefly movable and immovable, though there are other types of distinction) is in the .nif model itself and can't be changed in the GECK, so you need something that doesn't move, and the projectile is shot out from the middle with this script. If your BB gun is indeed not mobile, you can put it anywhere and it will never fall. Otherwise, use that trap shotgun model. For cosmetics, you can put the BB gun in that shell model, but it's not functionally necessary. Objects that have an OnActivate block in their scripts will always use the scripting in that block and will never run their standard Activate function unless scripted to do so. Activate is a scripting function that will not use the commands in the OnActivate block but instead use the game's default action (if it's an item, pick it up; if it's an NPC, talk to them, &c. &c.), so you will often see that at the end of an OnActivate block to make activating an object do what it normally does as well as some extra stuff. If you set the flag on that function by using Activate 1, then it will actually just run the OnActivate block and not the object's/NPC's default Activate. However, if you make this test gun an Activator, as I've suggested, none of that's even relevant because whilst it may look like a weapon, it isn't, and if you had no script attached to it, activating it would just not do anything. Activators have no default response to being activated, whereas an object the game recognised as a weapon would be picked up unless it had an OnActivate block in its script, in which case it would run that until told otherwise. Link to comment Share on other sites More sharing options...
LonesomeCoyote Posted March 23, 2018 Author Share Posted March 23, 2018 So I should make a copy of the Single Shotgun as my test weapon. I'm confused. I see the Activator record, which only contains the .nif and the attached script. So all I need to do in the CK is place the Activator and create a script to fire a certain projectile on activation? Link to comment Share on other sites More sharing options...
LonesomeCoyote Posted March 23, 2018 Author Share Posted March 23, 2018 This doesn't make sense because if there is no weapon then how would I adjust the spread and other things? Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 23, 2018 Share Posted March 23, 2018 The Single Shotgun is used a few times in the GECK. If you meant the Activator called trapShotgun, then yes, you do that and change its script. Did you look at my screenshots? If you do exactly what I did in them, it should work just as you want, except it will look like a shotgun. But it will still fire BB rounds. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 23, 2018 Share Posted March 23, 2018 (edited) It simulates firing an existing weapon, as if it were there, but it's not actually there. The weapon is specified via the editor ID which follows fireWeapon in that line. In the vanilla game, it specifies the single shotgun, but in our case, we're specifying the BB gun. If you want to modify something, you modify it in the BB gun's record, and that will be reflected when this function is called. If you want to alter the projectile, you alter the ammo of the BB gun, and it will be reflected in your test gun as well. Or you can duplicate all of the stuff you want to touch and make new IDs, but just change the ID of the weapon being fired in your test gun's script, so that it matches the new weapon you've made. Edit: Sorry, I should have said that you alter the projectile of the BB gun's ammo, not the 'ammo'. Colloquial language is competing with my GECK speak. Edited March 23, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
LonesomeCoyote Posted March 23, 2018 Author Share Posted March 23, 2018 I already made a special weapon and projectile for this test. Okay, I think I got it now! Now to test it. If it works I'll set up some distance markers. Link to comment Share on other sites More sharing options...
Recommended Posts