Demeggy Posted September 8, 2009 Posted September 8, 2009 Lo all, Ive been toying with the GECK now, folloing all the tutorials on the main wiki, and after having practised several times with a few experimental quests, I'm ready to spread my wings a little and extend my knowledge. I'm wanting my objective to reolve around collecting 3 items from around my map, and bring them back to a certain point. I understand the mechanics, placing said objects and triggers etc, it's just the scripting that's thrown me off. As the wiki tutorial stipulates checking for one item on the players belonging, and this runs through an 'if' statement, what would I need to put to check to see if the player has all of the three items? At current, the script is as thus; scn LCOGEndTRIG begin OnTrigger player if getStage VT74 < 100 if player.getHasNote 500yeardiary1 setStage VT74 100 endif endif end Thanks :)
Quetzlsacatanango Posted September 8, 2009 Posted September 8, 2009 There are probably a few ways, but I would do something like: if player.getitemcount itemxyz > 0 && player.getitemcount itemabc > 0 && player.getitemcount item123 > 0 setstage VT74 100 endif Obviously, if it's a note, use player.gethasnote instead.
Demeggy Posted September 8, 2009 Author Posted September 8, 2009 Massively appreciated :) Thanks. I'll give it a whirl and update.
Skree000 Posted September 8, 2009 Posted September 8, 2009 interesting... just curious if i can add to the question, what would the script be for checking if something is equipped? ima have a look at the FOSE doc again ><
Quetzlsacatanango Posted September 8, 2009 Posted September 8, 2009 GetEquipped http://geck.bethsoft.com/index.php/GetEquipped Edit: that is the command, the script would be something like: if player.GetEquipped itemabc = 1 "do stuff here" endif That's if you want to do stuff when the item is equipped. To do it when it's not equipped, change the 1 to a 0.
Demeggy Posted September 8, 2009 Author Posted September 8, 2009 and likewise, thanks very much man, this will come in handy big time for the reward to my quest :)
Demeggy Posted September 9, 2009 Author Posted September 9, 2009 Another query, saves posting a new topic I guess... Im trying to get a script on a custom weapon I've made to unlock whatever target it hits (i.e. doors). Is this possible? Im aware of the Unlock function, just not aware of a "target -> hit target -> result" function. Any help'd be grand thanks :)
c2552 Posted September 9, 2009 Posted September 9, 2009 target is simply "target" ^^so it would be scn <name> ref target begin scripteffectstart unlock target end then you need a Base Effect which uses the script and an Enchantment which uses the Base Effect. (be sure to set the script type to "Effect" in the dropdown-menu)now assign the Enchantment to the Object Effect of your weapon and it should work :)
Recommended Posts