Jump to content

Recieving Items Via Consoles or Computers


MRG

Recommended Posts

Greetings all,

 

Can someone please point me into the right direction, as to where I can find info &/or a tutorial that will tell me how I can get an item from a console in game?

 

For example:

 

I have made a mod & one of the items included is a custom Mainframe. In game once I activate the mainframe, I get my custom message. After I choose an option, I get the confirmation message that said I got the item, but I didn't actually get the item, I just got the custom reply that I had typed in to be the response.

 

-MRG

Link to comment
Share on other sites

What does your script look like>??

It should look something like: player.addItem TeddyBear01 1

 

P.S. I dont know much about Mainframes or scripts, i just think if we could see your script maybe we can help a bit better..

Link to comment
Share on other sites

Got some more tweaking to do.

 

I have it so that it'll now give me the item I want, but it'll give it to me as soon as I activate the Mainframe, regardless if I manage to hack it or not. I want it to only give me the item once I choose it from the options via the Mainframes custom text.

 

scn APCDMainframeArmorScript

begin OnActivate

if IsActionRef player == 1

Player.AddItem 00020420 1

endif

Activate

end

 

That's what I have at the moment. i'm less than a noob when it comes to scripting, so be gentle.. lol

 

-MRG

Link to comment
Share on other sites

Im a noob too dude, so it's a case of the blind leading the blind here. But obviously “begin OnActivate” happens the moment you use the terminal, which makes sense.

 

What you need to find is a way to activate the script once an option has been selected in the terminal..

 

Try putting your code in the 'item result script' box on the menu item you want to do this with?

I think you will only need the line: “Player.AddItem 00020420 1”

Link to comment
Share on other sites

Thanks for the reply's Trebtreb,

 

This is what the screen looks like that I am talking about. This is the screen I get after I double click on the item I placed into the gameworld & then click on "EDIT BASE". The ID that I use in my script is just a basic suit of Combat Armor, I used it simply as a base to see if I could get an item to spawn. I'll scan through the other scripts & then just go through the process of elimination.

 

http://img149.imageshack.us/img149/6830/mainframeux4.jpg

 

-MRG

Link to comment
Share on other sites

See how you've got 'item1' selected in that screen.. and a big empty box that is called "Item Result Script" above the "Complie Result" button..

What happens when you put the code:

Player.AddItem 00020420 1

in that "Item Result Script" box and test it in game?

Link to comment
Share on other sites

See how you've got 'item1' selected in that screen.. and a big empty box that is called "Item Result Script" above the "Complie Result" button..

What happens when you put the code:

Player.AddItem 00020420 1

in that "Item Result Script" box and test it in game?

 

I have not placed the additem code in the spot you are talking about, I always had the script selected up at the top.

 

I'll try it that way & report back.

 

-MRG

 

Update:

 

+1 kudo to you trebtreb. That did the trick.

 

Thanks much!

 

-MRG

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...