Jump to content

Help about scripting


palingenesis21

Recommended Posts

Hello everyone.
I wanted to realize for F3, an AA-12 Assault Rifle can use 2 different ammos, I counted to inspire me of scripts which were already conceived for a weapon which uses three of them (In this case: it was for a grenade launcher).
So it's three scripts.

But being totally new in Scripting (especially for loops conditions), I have a lot of trouble getting them back.

 

For all intents and purposes, I put you in attachments, the 3 scripts in question (It was for a grenade launcher that a moddeur had done.It could use 3 kinds of grenade: frag, incendiary, and IMP)

Knowing that I have only two ammunition (Cal12 and Cal12EXP), I think that in my case, there would be 2 scripts to do only.

The particularity of these scripts is that they are founded on the inventory that you have.

Thus, if the 3 ammos are in you inventory, and you click on the weapon via the Pipboy interface, the menu of complete selection with three lines is then displayed.
If 2 ammos are present, there will be only 2 lines.
If only one is present, there is no selection menu that displays.

 

Another thing: like you can note, using "tokens" does not seem necessary.

So, again, I would like to do the same thing, but for 2 ammos only.

 

If a charitable soul could help me, it would be cool.

 

Thanks !

Link to comment
Share on other sites

Ya you just need 2 scripts , 1 for each weapon. And 2 ammo checks per weapon script , instead of 3 like it has.

At least in theory. I'm a little unclear how their scripts for the grenade launcher are working. But if it is indeed working with that mod. How about add a 3rd ammo just to get it up and running following their script. Then take it away (or keep it ?) By just adding a semi colon in front of what appears will turn off that 3rd choice per script. And of course you wouldn't be using a 3rd script either.

 

IDK hope that helps. But another way to do it ... would be to change the weapon projectile ... only using 1 weapon. Which in case you didn't know ... the ammo a weapon uses , and the down range projectile ... have no bearing on each other , other than them both being attached to the same weapon. So to have 1 weapon use more than one ammo ... you would need to put them in a list , then attach the list to the weapon. But would still need to check each ammo count in inventory to swap the projectile implied.

 

It's probably half dozen and six the other way with each method. But somethings may be more possible for 1 or the other method. So if you like the method and render they use ... would just stick with that.

Link to comment
Share on other sites

  • 3 weeks later...

i have never tried this and im not sure if it works but have you tried making a new formlist and adding the 2 types of ammo to it?

 

example pictures

 

ammolistexample.jpg

 

ammolist2.jpg

 

 

I hope it helps, Happy Modding

Link to comment
Share on other sites

  • Recently Browsing   0 members

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