Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'GiveItem' help
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#1
'GiveItem' help

Hey there,

I want to give the player the slide_door_lever, but I can't find the .tga file. I've tried to just put .tga behind the name, but it doesn't work.

The lever is in entities/ptest

Thanks!
03-09-2013, 03:23 PM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#2
RE: 'GiveItem' help

(03-09-2013, 03:23 PM)Smoke Wrote: Hey there,

I want to give the player the slide_door_lever, but I can't find the .tga file. I've tried to just put .tga behind the name, but it doesn't work.

The lever is in entities/ptest

Thanks!

Maybe the name of the lever isn't right ? Have you changed the name ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 03-09-2013, 03:28 PM by No Author.)
03-09-2013, 03:27 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#3
RE: 'GiveItem' help

(03-09-2013, 03:27 PM)No Author Wrote:
(03-09-2013, 03:23 PM)Smoke Wrote: Hey there,

I want to give the player the slide_door_lever, but I can't find the .tga file. I've tried to just put .tga behind the name, but it doesn't work.

The lever is in entities/ptest

Thanks!

Maybe the name of the lever isn't right ? Have you changed the name ?

It is, I just copied it and didn't change anything..
03-09-2013, 03:31 PM
Find
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#4
RE: 'GiveItem' help

is it this one?

amnesia/redist/graphics/ptest/item/lever_l03.tga
03-09-2013, 03:54 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#5
RE: 'GiveItem' help

(03-09-2013, 03:54 PM)darksky Wrote: is it this one?

amnesia/redist/graphics/ptest/item/lever_l03.tga

Yes... Thank you, I'm stupid Tongue
03-09-2013, 04:12 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#6
RE: 'GiveItem' help

Okay, it worked. But now I want to make something happen when the lever is used on a script area. It always says: Cannot use this item this way.

I've tried:

AddUseItemCallback("", "slide_door_lever_handle", "castle_portcullis_3", "addhandle", true);

AddUseItemCallback("", "slide_door_lever_handle_1", "castle_portcullis_3", "addhandle", true);

And neither of them worked. Could someone tell me how to use it?
03-11-2013, 08:27 PM
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#7
RE: 'GiveItem' help

(03-11-2013, 08:27 PM)Smoke Wrote: Okay, it worked. But now I want to make something happen when the lever is used on a script area. It always says: Cannot use this item this way.

I've tried:

AddUseItemCallback("", "slide_door_lever_handle", "castle_portcullis_3", "addhandle", true);

AddUseItemCallback("", "slide_door_lever_handle_1", "castle_portcullis_3", "addhandle", true);

And neither of them worked. Could someone tell me how to use it?

in the ingame area is the callback written in there? also is the checkbox checked (the one that says check me if an item is used on this area)

03-11-2013, 08:32 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#8
RE: 'GiveItem' help

(03-11-2013, 08:32 PM)WIWWM Wrote:
(03-11-2013, 08:27 PM)Smoke Wrote: Okay, it worked. But now I want to make something happen when the lever is used on a script area. It always says: Cannot use this item this way.

I've tried:

AddUseItemCallback("", "slide_door_lever_handle", "castle_portcullis_3", "addhandle", true);

AddUseItemCallback("", "slide_door_lever_handle_1", "castle_portcullis_3", "addhandle", true);

And neither of them worked. Could someone tell me how to use it?

in the ingame area is the callback written in there? also is the checkbox checked (the one that says check me if an item is used on this area)

I wasnt sure if it worked on an area, so used it on a door first. And i'll try that once I'm back home
03-11-2013, 08:45 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#9
RE: 'GiveItem' help

Make sure the callback function is void addhandle(string &in asItem, string &in asEntity)

In Ruins [WIP]
03-11-2013, 09:38 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#10
RE: 'GiveItem' help

(03-11-2013, 08:32 PM)WIWWM Wrote:
(03-11-2013, 08:27 PM)Smoke Wrote: Okay, it worked. But now I want to make something happen when the lever is used on a script area. It always says: Cannot use this item this way.

I've tried:

AddUseItemCallback("", "slide_door_lever_handle", "castle_portcullis_3", "addhandle", true);

AddUseItemCallback("", "slide_door_lever_handle_1", "castle_portcullis_3", "addhandle", true);

And neither of them worked. Could someone tell me how to use it?

in the ingame area is the callback written in there? also is the checkbox checked (the one that says check me if an item is used on this area)

I forgot to mention I give this lever to me trough the script. So it has no name (Not one I can think of)
(This post was last modified: 03-11-2013, 10:51 PM by OriginalUsername.)
03-11-2013, 10:51 PM
Find




Users browsing this thread: 1 Guest(s)