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
Rodmaschine script
P44RTHURN4X Offline
Junior Member

Posts: 35
Threads: 16
Joined: Apr 2012
Reputation: 0
#1
Rodmaschine script

Hey everyone!

I want to make a room with a rodmaschine (in the main story -> maschineroom: the box with the 3 holes for 1 blue, 1 red and 1 yellow rod). But I don't know the right script for it!

Can you tell me please the script for this rodmaschine (name: rodm) with 1 blue (rod_b), 1 red (rod_r) and 1 yellow (rod_y) rod. Please tell me the script for this things where the first hole for the blue, the second hole for the red and the third hole for the yellow rod is.



GReeZe' P44
06-06-2012, 06:58 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Rodmaschine script

Pretty simple, it will work similarly to a crowbar, which works similarly to using a key on a door. Assuming you know how to make a AddUseItemCallback, most of this takes place in the level editor.

In the level editor, you will need to have a copy of the rod in the machine, to do this, simply find the matching color rod of the one you want, try to fit it into the machine as best you can, make sure Static Physics is checked, and set it inactive.

The Static Physics will make the player unable to further interact with it, and you can set it active through scripts so it appears the player puts it in the machine.

For the callback, you will want to do the following:
-Remove the item from your inventory
-Set the duplicate in the machine active
(optional)
-Play a small metal-clinking sound effect
-Create a small dust particle system.

Finally, you will need to add variables, then when the count of them is equal to 3, it can trigger your event. Or you can do a simpler version (like in Followed by Death, Chp 2) where in order to get the next rod, you must use your current one; this eliminates the need for variables.

You may also want to check the map where this was done in the original game, it will be the most helpful to you.

I rate it 3 memes.
06-06-2012, 09:49 PM
Find




Users browsing this thread: 2 Guest(s)