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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Dont understand this
Author Message
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
Dont understand this

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012, 08:23 PM
Website Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Dont understand this

(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


(This post was last modified: 01-06-2012, 08:24 PM by SilentStriker.)
01-06-2012, 08:24 PM
Find Reply
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#3
RE: Dont understand this

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012, 08:28 PM
Website Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Dont understand this

(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


01-06-2012, 08:30 PM
Find Reply
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#5
RE: Dont understand this

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012, 08:31 PM
Website Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: Dont understand this

(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





01-06-2012, 08:34 PM
Find Reply
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#7
RE: Dont understand this

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012, 08:40 PM
Website Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#8
RE: Dont understand this

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

(This post was last modified: 01-06-2012, 08:44 PM by SilentStriker.)
01-06-2012, 08:43 PM
Find Reply
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#9
RE: Dont understand this

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012, 08:54 PM
Website Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#10
RE: Dont understand this

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

01-06-2012, 08:55 PM
Find Reply




Users browsing this thread: 1 Guest(s)