Frictional Games Forum (read-only)

Full Version: Dont understand this
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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
(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

Ah there it is Ty Smile gonna try it!! Smile +rep
(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/amn...s#general2

Hey my mind is blank what im gonna have in "string& asName"
(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




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
always remember you need to have "" on strings for example "woodenblock" and not woodenblock. Strings need a " on each side to work Smile
yeah i have it to work but the game says" Cant use that item that way"
(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?
Pages: 1 2 3