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


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Dont understand this
Author Message
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #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 Confused

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-06-2012 08:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 Confused
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 all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

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

Okey ty but i dont get the hammer to work on a woodenblock Confused 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
Visit this user's website Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)