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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Script Codes for Shutting Swing Door?
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#1
Exclamation  Script Codes for Shutting Swing Door?

Hey there, I've been working on my custom story for a while now.

The player enters his bedroom, and he decides to go to sleep, but first he must blow out all the candles, so he does. Then, once all the candles are out, the player teleports to the bed. He then wakes up on the bed. I want it so that while he is teleporting to the bed, the door shuts. Without the player saying it or anything like that. So that even if the player doesn't shut the door, it does it anyway.
05-04-2013, 05:48 PM
Find
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#2
RE: Script Codes for Shutting Swing Door?

(05-04-2013, 05:48 PM)FurtherGames Wrote: <bolded text question here>

http://wiki.frictionalgames.com/hpl2/amn...ions#doors Should have the function you're looking for. Specifically, it's this one:

void SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects);
string& asName = "Insert the name of the door here"
bool abClosed = true/false, you want true
bool abEffects = true/false depending on if you want sound to accompany the door closing

And one more thing. I believe the majority of the questions you've asked so far have been answered before and in tutorials on the wiki. Try searching here http://wiki.frictionalgames.com/hpl2/tut..._tutorials and the forum before you post a question. I certainly don't mind answering, but posting a new thread for each scripting question bumps other people's questions down the page which certainly doesn't help them get their questions answered. I usually just post new questions in the same thread as my old, answered one (so long as they are relevant) to avoid spamming everyone Smile

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 05-04-2013, 06:12 PM by CarnivorousJelly.)
05-04-2013, 05:58 PM
Find
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#3
RE: Script Codes for Shutting Swing Door?

(05-04-2013, 05:58 PM)Kiandra Wrote:
(05-04-2013, 05:48 PM)FurtherGames Wrote: <bolded text question here>

http://wiki.frictionalgames.com/hpl2/amn...ions#doors Should have the function you're looking for. Specifically, it's this one:

void SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects);
string& asName = "Insert the name of the door here"
bool abClosed = true/false, you want true
bool abEffects = true/false depending on if you want sound to accompany the door closing

And one more thing. I believe the majority of the questions you've asked so far have been answered before and in tutorials on the wiki. Try searching here http://wiki.frictionalgames.com/hpl2/tut..._tutorials and the forum before you post a question. I certainly don't mind answering, but posting a new thread for each scripting question bumps other people's questions down the page which certainly doesn't help them get their questions answered. I usually just post new questions in the same thread as my old, answered one (so long as they are relevant) to avoid spamming everyone Smile

I sort of dislike using that website because it's sort of mashed up.
05-04-2013, 06:23 PM
Find
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#4
RE: Script Codes for Shutting Swing Door?

Just use the search function at the top or press CTRL+F on your keyboard and type in a search word

As messy as it is, it's useful. Seriously. Most of what I've learned comes from there and reading other people's questions on the forum

There's also YourComputer's scripting tutorial guide, but I can't find it right now. I'll update this post with a link when I do.

Edit found them:
http://www.frictionalgames.com/forum/thread-10798.html
http://www.frictionalgames.com/forum/thread-19933.html
http://www.frictionalgames.com/forum/thread-19019.html
There's a lot more under the Articles Thread if you just look. Once you understand what string, bool, and float mean, you can use the majority of scripts available.

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 05-04-2013, 07:55 PM by CarnivorousJelly.)
05-04-2013, 07:52 PM
Find




Users browsing this thread: 1 Guest(s)