Exodus1111 Posted November 13, 2010 Posted November 13, 2010 My mod is coming along, ill have it out by monday hopefully.But ive run into a snag as im not familiar with the Scripting. I need to put FormList into an IF statement using GetEquipped. Something like this : If Player.GetEquipped == FormList.MyFormList Im assuming its not THAT easy, whats the correct syntax here ? -Exo
Exodus1111 Posted November 13, 2010 Author Posted November 13, 2010 Or howbout: If Player.GetEquipped == IsInList MyFormList That one looks more probable. -Exo
fronzelneekburm Posted November 13, 2010 Posted November 13, 2010 Just take a look at the game itself. For example to check if the player is wearing NCR armor the game uses: if player.GetEquipped FactionGearNVNCR == 1 It's really that easy. Just take a peek how its done in the original game, that usually helps a lot.
Exodus1111 Posted November 13, 2010 Author Posted November 13, 2010 On 11/13/2010 at 12:04 PM, fronzelneekburm said: Just take a look at the game itself. For example to check if the player is wearing NCR armor the game uses: if player.GetEquipped FactionGearNVNCR == 1 It's really that easy. Just take a peek how its done in the original game, that usually helps a lot. oooh, there we go, good example. im assuming FactionGearNVNCR is a formlist. Thanks a lot m8. -Exo
fronzelneekburm Posted November 13, 2010 Posted November 13, 2010 Yeah FactionGearNVNCR is indeed a formlist, just containing all armors that count as "NCR". Replace that with whatever your list is called.
Exodus1111 Posted November 13, 2010 Author Posted November 13, 2010 On 11/13/2010 at 12:08 PM, fronzelneekburm said: Yeah FactionGearNVNCR is indeed a formlist, just containing all armors that count as "NCR". Replace that with whatever your list is called. Sw33t. Thank you very much. -Exo
Cipscis Posted November 13, 2010 Posted November 13, 2010 On 11/13/2010 at 12:04 PM, fronzelneekburm said: Just take a look at the game itself. For example to check if the player is wearing NCR armor the game uses: if player.GetEquipped FactionGearNVNCR == 1 It's really that easy. Just take a peek how its done in the original game, that usually helps a lot.Even that is more complicated than it needs to be. This is all you'd need to check if the player has at least one item in that form list equipped:if player.GetEquipped FactionGearNVNCR@Exodus1111:I recommend you take a look at my Scripting for Beginners tutorial, where I go over the basics of Fallout script syntax. Cipscis
Exodus1111 Posted November 13, 2010 Author Posted November 13, 2010 On 11/13/2010 at 7:53 PM, Cipscis said: On 11/13/2010 at 12:04 PM, fronzelneekburm said: Just take a look at the game itself. For example to check if the player is wearing NCR armor the game uses: if player.GetEquipped FactionGearNVNCR == 1 It's really that easy. Just take a peek how its done in the original game, that usually helps a lot.Even that is more complicated than it needs to be. This is all you'd need to check if the player has at least one item in that form list equipped:if player.GetEquipped FactionGearNVNCR@Exodus1111:I recommend you take a look at my Scripting for Beginners tutorial, where I go over the basics of Fallout script syntax. Cipscis Alright thanks, cleaner code w00t! I checked out ur page earlier, wasnt planning to do any scripting for this, kinda just stumbled on it.But ill definitely check it out now. -Exo
Recommended Posts