Septfox Posted November 3, 2011 Share Posted November 3, 2011 Well basically, this is what I've got:set weapon to player.getequippedobject 5 if ( player.getweaponanimtype < 4 || weapon.getweaponhasscope == 1) ;see if the player is either unarmed, using a melee weapon or a weapon with a scope return ;if so, there's no need for switching endifThe first condition is working fine. The second doesn't seem to be doing anything at all. As far as I know, I have everything set up right; "weapon" is declared as a reference up top, getequippedobject should be storing the ID of it, then getweaponhasscope should be checking it. But it isn't. When I equip a scoped weapon in-game, the script keeps merrily running instead of restarting like it should. I did try removing the first condition in case...er well, just to check, with the same results. Am I making some incredibly stupid mistake here? :\Further, is there a more direct method of checking the equipped weapon for a scope? Link to comment Share on other sites More sharing options...
Blazk Posted November 3, 2011 Share Posted November 3, 2011 Are you using Fallout Script Extender? Link to comment Share on other sites More sharing options...
schlangster Posted November 3, 2011 Share Posted November 3, 2011 weapon is not a reference, it's a base form. So you have to use getweaponhasscope weapon instead of weapon.getweaponhasscope Link to comment Share on other sites More sharing options...
Septfox Posted November 3, 2011 Author Share Posted November 3, 2011 (edited) Are you using Fallout Script Extender?Of course, other vital functions of my script depend on it. Vanilla script functions are so...limited in some ways.weapon is not a reference, it's a base form. So you have to use getweaponhasscope weapon instead of weapon.getweaponhasscope<insert short string of curses here>Y'know, I probably would have ended up writing some kind of multiple-line-spanning workaround for this, JUST because I was being an idiot. I was storing it as a reference, so it seemed perfectly logical to me to USE it like a reference. Durr. Well, adding that when I get home should bring my script to 98% functional, thank you for figuring it out for me. Now all I need to do is figure out a way to remove the crosshair on demand. While I have your attention, I don't suppose either of you know how to do that? Edited November 3, 2011 by Septfox Link to comment Share on other sites More sharing options...
Recommended Posts