OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
'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 |
|
No Author
Posting Freak
Posts: 962
Threads: 10
Joined: Jun 2012
Reputation:
13
|
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 ?
(This post was last modified: 03-09-2013, 03:28 PM by No Author.)
|
|
03-09-2013, 03:27 PM |
|
OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
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 |
|
darksky
Member
Posts: 52
Threads: 8
Joined: Nov 2012
Reputation:
2
|
RE: 'GiveItem' help
is it this one?
amnesia/redist/graphics/ptest/item/lever_l03.tga
|
|
03-09-2013, 03:54 PM |
|
OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
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
|
|
03-09-2013, 04:12 PM |
|
OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
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 |
|
7heDubz
Posting Freak
Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation:
41
|
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 |
|
OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
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 |
|
NaxEla
Senior Member
Posts: 415
Threads: 5
Joined: Dec 2012
Reputation:
28
|
RE: 'GiveItem' help
Make sure the callback function is void addhandle(string &in asItem, string &in asEntity)
|
|
03-11-2013, 09:38 PM |
|
OriginalUsername
Posting Freak
Posts: 896
Threads: 42
Joined: Feb 2013
Reputation:
34
|
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)
|
|
03-11-2013, 10:51 PM |
|
|