Frictional Games Forum (read-only)
'GiveItem' help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: 'GiveItem' help (/thread-20674.html)

Pages: 1 2


'GiveItem' help - OriginalUsername - 03-09-2013

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!


RE: 'GiveItem' help - No Author - 03-09-2013

(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 ?


RE: 'GiveItem' help - OriginalUsername - 03-09-2013

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


RE: 'GiveItem' help - darksky - 03-09-2013

is it this one?

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


RE: 'GiveItem' help - OriginalUsername - 03-09-2013

(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


RE: 'GiveItem' help - OriginalUsername - 03-11-2013

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:

Code:
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?


RE: 'GiveItem' help - 7heDubz - 03-11-2013

(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:

Code:
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)


RE: 'GiveItem' help - OriginalUsername - 03-11-2013

(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:

Code:
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


RE: 'GiveItem' help - NaxEla - 03-11-2013

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


RE: 'GiveItem' help - OriginalUsername - 03-11-2013

(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:

Code:
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)