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] Breakable Door
Erik The Born Offline
Member

Posts: 59
Threads: 7
Joined: Mar 2013
Reputation: 0
#8
RE: [SCRIPT] Breakable Door

(03-23-2013, 10:33 AM)Knusper. Wrote: value 4 is "BreakImpulse" Value= "-1""
You have to name all entities like they are named in the scripts
or name all entities in the scripts like you named them in the editor.
(the words behind "//" can help)
And you have to put the areas just at the place where the door is.
(impact area, breakeffect areas)
And ofc name them like they are named in the scripts, too.

Naming all entities right is very important.
Think of the hammer, the broken pieces and the areas!

then it should work.

The only thing i dont like is that if you just hit the door very weak, it breaks too.
I will try to make that you have to through an item.

Thank you. I wil try to do this as you said. What about ImpactArea and BreakEffect areas? What is those? PS: I managed to do it finally Big Grin I will make a Tutorial now. Your a life saver man!

Heres hopefully a noob friendly turoial on how to make a door that you can destroy with a sledgehammer.

Step 1. Go to the entities folder then mansion and copy mansion_broken.ent. then paste it to the same folder and rename it to mansion_broken_static.ent. Open the mansion_broken_static.ent with a text editor such as notepad or notepad++. Look for breakimpulse. Theres a value there which should say 4. Change it to -1. Save the file and open your leveleditor. Make a room. Make a mansion door.

Like this
[Image: Step%201.png]

Step 2 This is very important. Rename the door you just added to BreakableDoor_1. Case sensetive.

Like this
[Image: Step%202.png]

Step 3. Add the new made mansion_broken_static to your map and Place it right behind your door. Also name it Piece_1.

Like this
[Image: Step%203.png]
Sry I know its big.
Step 4. With the mansion_broken_static selected, got to Entity tab in the editor and check the box StaticPhysic.

Step 5. Click CTRL + D in the editor with the mansion_broken_static selected.. This should make an exact copy of the mansion_broken_static at the same place you have placed the first 1. The editor should rename the second mansion_broken_static to Piece_2 but in case it doesnt, rename it to Piece_2. You done? NO! Now you need to add the areas mentioned. Its ImpactArea and BreakEffect.

Step 6. Add a script from the editor. Do this by clicking the black cube in the editor. To the right of the editor you should see "Area Type". Choose Script. Draw it around the door. Make it as Close to the door you can. Name the area to BreakEffect. Make Another Script and make it as Close to the door as you can. Name it ImpactArea.

Step 7. Add a sledgehammer. Its important that you name it in the entity tab "Sledgehammer" without qoutes. Its case sensetive. So make sure you do have a Big S in Sledgehammer!

Step 8. Save your map now. Your done in the level editor. Now you should have a .map file in your custom story. make a new textdocument. It has to have the EXACT same name as your .map has. Case sensetive. Open the txt file you made and paste the script that this guy had in his spoiler. Save it. Now you must change the file extension from txt to hps. Do that by simple chosing to rename the file and choose only to rename the extension from txt to hps. DONE!

Step 8. Enjoy your brekable door!

If you have any problems post your steps here you made exactly and I or some1 else might be able to tell you what you did wrong. Remember to rename the entites and areas exactly as described here!
(This post was last modified: 03-23-2013, 01:59 PM by Erik The Born.)
03-23-2013, 10:41 AM
Find


Messages In This Thread
[SCRIPT] Breakable Door - by Vic7im - 09-26-2012, 02:33 PM
RE: I'll just leave this here. - by Robby - 09-26-2012, 02:34 PM
RE: [SCRIPT] Breakable Door - by Fatalist - 12-22-2012, 08:59 AM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-21-2013, 06:21 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-22-2013, 03:13 AM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-23-2013, 09:01 AM
RE: [SCRIPT] Breakable Door - by Knusper. - 03-23-2013, 10:33 AM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-23-2013, 10:41 AM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-23-2013, 02:54 PM
RE: [SCRIPT] Breakable Door - by Knusper. - 03-23-2013, 12:01 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-23-2013, 01:48 PM
RE: [SCRIPT] Breakable Door - by Knusper. - 03-23-2013, 06:09 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 08:04 AM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 08:21 AM
RE: [SCRIPT] Breakable Door - by Knusper. - 03-24-2013, 09:14 AM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 12:05 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 12:19 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 12:27 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 02:14 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 02:26 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 02:27 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 02:58 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 02:59 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 03:18 PM
RE: [SCRIPT] Breakable Door - by PutraenusAlivius - 03-24-2013, 03:19 PM
RE: [SCRIPT] Breakable Door - by Erik The Born - 03-24-2013, 03:30 PM
RE: [SCRIPT] Breakable Door - by Adrianis - 03-24-2013, 10:21 PM
RE: [SCRIPT] Breakable Door - by The chaser - 03-24-2013, 11:55 AM
RE: [SCRIPT] Breakable Door - by The chaser - 03-24-2013, 03:09 PM



Users browsing this thread: 5 Guest(s)