Jump to content

What is the correct syntax for scripting in a formlist ?


Exodus1111

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

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