Jump to content

Does getweaponhasscope not work...


Septfox

Recommended Posts

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 
	
endif

The 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

  On 11/3/2011 at 2:19 PM, Blazk said:

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.

  On 11/3/2011 at 3:56 PM, schlangster said:

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 by Septfox
Link to comment
Share on other sites

  • Recently Browsing   0 members

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