Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Custom item and Give Item script help
Author Message
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #1
Exclamation Custom item and Give Item script help
Ok so I have a custom item that I have modified, I turned one of the entities from the game, "Note_generic1" into a puzzle item though the model editor, saved it to its own folder with its required recourse's. I also have its own item picture. But I come across 2 problems.

One of my problems is that when I put the new item in the game, it does not have its glow around the object, it acts like a static object. How can I make it to where when I want to pick up it gives me that custom item in my inventory?

Also how to I use Give Item script properly? I have tried giving the player the custom item from the start. This is part of the script:
//
GiveItem("note_generic", "note_generic", "Funeral Bill", note_generic.png, 1);

But it comes up with errors saying this:
note_generic is not declared.

It also states in the function that the object does not half to be in the world.

Can anybody help me out on this? This is the one thing im truly stumped on, im also the one working on that custom story "The Hands That Resist Him" So if anybody can help me out on these 2 problems I would be grateful.
12-29-2011 09:19 PM
Find all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #2
RE: Custom item and Give Item script help
(12-29-2011 09:19 PM)jssjr90 Wrote:  Ok so I have a custom item that I have modified, I turned one of the entities from the game, "Note_generic1" into a puzzle item though the model editor, saved it to its own folder with its required recourse's. I also have its own item picture. But I come across 2 problems.

One of my problems is that when I put the new item in the game, it does not have its glow around the object, it acts like a static object. How can I make it to where when I want to pick up it gives me that custom item in my inventory?

Also how to I use Give Item script properly? I have tried giving the player the custom item from the start. This is part of the script:
//
GiveItem("note_generic", "note_generic", "Funeral Bill", note_generic.png, 1);

But it comes up with errors saying this:
note_generic is not declared.

It also states in the function that the object does not half to be in the world.

Can anybody help me out on this? This is the one thing im truly stumped on, im also the one working on that custom story "The Hands That Resist Him" So if anybody can help me out on these 2 problems I would be grateful.



As far as your first issue goes, you need to have the .ent file altered in the ModelEditor in order to make it an item (Found under User Defined Variables) Not sure if you've done this already, but it doesn't hurt to suggest such a thing.

Second issue is simply putting quotation marks around note_generic.png. It'll then look for a phrase instead of a variable in the script.

12-29-2011 09:26 PM
Find all posts by this user Quote this message in a reply
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #3
RE: Custom item and Give Item script help
Well I did alter it to a puzzle item like I said in the post, I can now take the note, but it picks it up like it is a note, and does not appear in my inventory.

Also on the 2nd thing of give item, I did do that, did not have any fatal errors, but it still will not appear in my inventory! Why must this be so frustrating! I give up! Jk, but still this is just uhhhh.
12-29-2011 09:36 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #4
RE: Custom item and Give Item script help
(12-29-2011 09:36 PM)jssjr90 Wrote:  Well I did alter it to a puzzle item like I said in the post, I can now take the note, but it picks it up like it is a note, and does not appear in my inventory.

Also on the 2nd thing of give item, I did do that, did not have any fatal errors, but it still will not appear in my inventory! Why must this be so frustrating! I give up! Jk, but still this is just uhhhh.

Altering it is one thing; giving the file a name that differs from the original so that the game doesn't revert to the original .ent file is another thing.

Tutorials: From Noob to Pro
(This post was last modified: 12-29-2011 10:24 PM by Your Computer.)
12-29-2011 10:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)