Jump to content

Need script that removes item and adds new item on pick up


LordMaddog

Recommended Posts

well I want to make a weapon that makes ammo for another weapon and I know how to but I don't know how to make the script

 

basically the first weapon shoots a projectile that you can pick up

 

now when you pick up the projectile it is removed and replaced with the ammo by script I thought the script would be easy but well after a few tries here I am any help?

Link to comment
Share on other sites

i think somthing like this would help

 

SCN ItemSwapSCRIPT

Begin OnAdd Player 
Player.RemoveItem ***** 1; where ***** is the name of your item you dont want
Player.AddItem +++++ 1; where +++++ is the name of the item you do want
End

Link to comment
Share on other sites

Creating duplicate threads isn't really a good idea - it means that any information that is put forth is scattered around multiple boards, so anyone posting is unlikely to be have read all relevant posts.

 

Here is my post from your duplicate thread:

This is already done with a projectile in-game - the baseball projectile. If you look at how that is set up, you should be able to deduce how to replicate this effect. The script would be very simple in nature, something like this:
ref rContainer

Begin OnAdd
set rContainer to GetContainer
rContainer.AddItem <MyAmmo> 1 1
RemoveMe
End

Cipscis

Link to comment
Share on other sites

Creating duplicate threads isn't really a good idea - it means that any information that is put forth is scattered around multiple boards, so anyone posting is unlikely to be have read all relevant posts.

 

I know I thought I deleted this one I added this one to the wrong form section

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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