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
Custom Story Editor Crowbar Puzzle
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#6
RE: Custom Story Editor Crowbar Puzzle

Alright, so first create three script areas, one which name is AreaPutCrowbar, one which name is break, one which name is BreakEffect. When this is done adjust the size of the three of them to your liking, AreaPutCrowbar should be pretty big since this is where you're supposed to put the crowbar there, break is where the entity crowbar_joint should "hit" (crowbar_joint is a item which can be dragged), so when it is dragged to a certain area (break) a function happens, BreakEffect can be small however, since it's only to create a particle system.

After that use this script;

Spoiler below!


AddEntityCollideCallback("Crowbar_1", "AreaPutCrowbar", "CrowbarAppear", true, 1);
AddEntityCollideCallback("Crowbar_1", "YOUR DOOR NAME", "CrowbarAppear", true, 1);

AddEntityCollideCallback("Crowbar_joint", "break", "BreakDoor", true, 1);

void CrowbarAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Crowbar_joint", true);
RemoveItem("Crowbar_1");
}

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("YOUR DOOR NAME", false, false);'
CreateParticleSystemAtEntity("", "ps_hit_wood", "BreakEffect", false);
PlaySoundAtEntity("", "break_wood", "BreakEffect", 0.0, false);
SetEntityActive("Crowbar_joint", false);
SetEntityActive("crowbar", true); //THIS SHOULD BE A CROWBAR ENTITY ONLY (NOT ITEM, NOT JOINT (name it crowbar)
}



Be sure to rename "YOUR DOOR NAME" to whatever your door is named, also add a entity called crowbar_joint (also name it crowbar_joint) and set in to inactive and make sure it can reach the break area. You can make this even better if you add a crowbar entity (no item or joint) and make a Prop impulse to the door so it looks like you've broken the lock
(This post was last modified: 06-21-2011, 09:13 PM by rojkish.)
06-21-2011, 08:55 PM
Find


Messages In This Thread
Custom Story Editor Crowbar Puzzle - by Mad Aztec - 06-21-2011, 04:19 PM
RE: Custom Story Editor Crowbar Puzzle - by Nye - 06-21-2011, 06:57 PM
RE: Custom Story Editor Crowbar Puzzle - by rojkish - 06-21-2011, 08:55 PM



Users browsing this thread: 1 Guest(s)