Frictional Games Forum (read-only)
[SCRIPT] Dont understand this - 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: [SCRIPT] Dont understand this (/thread-12407.html)

Pages: 1 2 3


Dont understand this - jessehmusic - 01-06-2012

Hello im trying to fix this that when player use hammer on wood block on door it should get destroyed but dont understand witch callback i should have :S


RE: Dont understand this - SilentStriker - 01-06-2012

(01-06-2012, 08:23 PM)jessehmusic Wrote: Hello im trying to fix this that when player use hammer on wood block on door it should get destroyed but dont understand witch callback i should have :S
have you tried
AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy); ?

Smile




RE: Dont understand this - jessehmusic - 01-06-2012

Ah there it is Ty Smile gonna try it!! Smile +rep


RE: Dont understand this - SilentStriker - 01-06-2012

(01-06-2012, 08:28 PM)jessehmusic Wrote: Ah there it is Ty Smile gonna try it!! Smile +rep
No problems Smile Use the wiki for all the scripts Smile (if you aren't already)

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#general2




RE: Dont understand this - jessehmusic - 01-06-2012

Hey my mind is blank what im gonna have in "string& asName"


RE: Dont understand this - SilentStriker - 01-06-2012

(01-06-2012, 08:31 PM)jessehmusic Wrote: Hey my mind is blank what im gonna have in "string& asName"
try this just use "" Smile because i don't think it needs a internal name Smile







RE: Dont understand this - jessehmusic - 01-06-2012

Okey ty but i dont get the hammer to work on a woodenblock :S this is the script i found on wiki
"void OpenDoor(string &in item, string &in door)
{
SetSwingDoorLocked(Woodenblock, false, true);
PlaySoundAtEntity("", "unlock_door", Woodenblock, 0, false);
RemoveItem(Hammer);
}"

Is that right



RE: Dont understand this - SilentStriker - 01-06-2012

always remember you need to have "" on strings for example "woodenblock" and not woodenblock. Strings need a " on each side to work Smile



RE: Dont understand this - jessehmusic - 01-06-2012

yeah i have it to work but the game says" Cant use that item that way"


RE: Dont understand this - SilentStriker - 01-06-2012

(01-06-2012, 08:54 PM)jessehmusic Wrote: yeah i have it to work but the game says" Cant use that item that way"
Can I see your whole script?