Gaming Underground Network

Come for the Mods, Stay for the Community!
 
HomeCalendarFAQMemberlistUsergroupsRegisterLog in
Info Panel
________________

Profile Image Guidelines
December 2016
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 
CalendarCalendar

Share | 
 

 Help fixing a Script for Ammo Sorting

View previous topic View next topic Go down 
AuthorMessage
gunslinger6792



Posts : 242
Join date : 2014-04-04
Age : 24
Location : North Carolina, United States

PostSubject: Help fixing a Script for Ammo Sorting   Mon May 26, 2014 3:17 pm

I'm trying to get a script to work that a friend gave me to sort ammo. I want my 5.56mm ammo to go into an ammo box that's ID name is houseammobox4. The geck gives me a warning saying its an invalid reference that only object references and reference variables are allowed in that context. Can anyone here help me out?

Short Playercount

Set PlayerCount to (Player.GetItemCount Ammo556mm)
Player.RemoveItem Ammo556mm PlayerCount 1
houseammobox4.AddItem Ammo556mm PlayerCount 1
Back to top Go down
View user profile
hitman47101



Posts : 1880
Join date : 2014-03-01
Age : 23

PostSubject: Re: Help fixing a Script for Ammo Sorting   Mon May 26, 2014 9:29 pm

Are you sure that the containers ref ID is houseammobox4 and that it is set as a persistent reference?

Because that script works for me, i just tried it.
Back to top Go down
View user profile
gunslinger6792



Posts : 242
Join date : 2014-04-04
Age : 24
Location : North Carolina, United States

PostSubject: Re: Help fixing a Script for Ammo Sorting   Tue May 27, 2014 2:13 am

I'll double check but yes I believe so.
Back to top Go down
View user profile
gunslinger6792



Posts : 242
Join date : 2014-04-04
Age : 24
Location : North Carolina, United States

PostSubject: Re: Help fixing a Script for Ammo Sorting   Tue May 27, 2014 3:18 pm

I still can't get the script to work I keep getting errors. The ammo box is set to persistent but still no joy.
Back to top Go down
View user profile
hitman47101



Posts : 1880
Join date : 2014-03-01
Age : 23

PostSubject: Re: Help fixing a Script for Ammo Sorting   Wed May 28, 2014 11:38 am

Sorry its taken me so long to reply.

How exactly are you using this script? an activator or something else?

Edit: This script will work, just attach it to your activator.

scn AmmoSortingScript

Short Playercount

Begin OnActivate

Set PlayerCount to (Player.GetItemCount Ammo556mm)
Player.RemoveItem Ammo556mm PlayerCount 1
houseammobox4.AddItem Ammo556mm PlayerCount 1

End


I hope this helps. Smile
Back to top Go down
View user profile
gunslinger6792



Posts : 242
Join date : 2014-04-04
Age : 24
Location : North Carolina, United States

PostSubject: Re: Help fixing a Script for Ammo Sorting   Wed May 28, 2014 1:47 pm

I'm trying to use the script in the terminal. The idea being is the player clicks on sort 556ammo and the ammo (in theory) should be removed from the players inventory and placed into houseammobox4 or 5.56mm Ammo (thats the name of the ammo box in game) I tried your script by placing it in terminal but I got the same error. I may just scrap the sorting idea since its complexities seem beyond me. Thank you for trying to help and your replies I think its lack of knowledge on my end thats making this so difficult.
Back to top Go down
View user profile
nyaalich



Posts : 18
Join date : 2014-05-01

PostSubject: Re: Help fixing a Script for Ammo Sorting   Tue Jun 17, 2014 2:48 pm

Haven't setup a console in a mod before, but I imagine that it works similarly to menus. You'd need to add the script that hitman provided to the script that controls what happens when each console option is selected.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Help fixing a Script for Ammo Sorting   Today at 2:18 pm

Back to top Go down
 

Help fixing a Script for Ammo Sorting

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» ammo box in wolf3d
» changing max ammo and hp
» Flying ammo box chicken cluckshot droppings!!
» Chess Script
» Help a noob out? (Ammo Edition)

Permissions in this forum:You cannot reply to topics in this forum
Gaming Underground Network :: Fallout :: Troubleshooting-