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


Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Use crowbar to open a door
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#21
RE: [Tutorial] Use crowbar to open a door

(05-15-2012, 07:18 AM)SilentStriker Wrote: Either I'm just a bit slow today or I don't really understand what you meen (my nativ language is swedish)

I know what everything in the code does but I guess I'm not showing it properly?

Oh, I missed that you commented the code and removed the asTimer. Still, I've underlined some mysterious things for you:


//Makes it able for the Crowbar_joint to collide with the area in my case the area is named BreakDoor

//Calls a timer that places the crowbar in the door frame.
AddTimer(asEntity, 0.2, "TimerSwitchShovel");

//Remove callback incase player never touched door
SetEntityPlayerInteractCallback("NAMEOFDOOR", "", true);
SetEntityPlayerInteractCallback("NAMEOFTHEAREA", "", true);


}

//The timer we called before
void TimerSwitchShovel(string &in asTimer)
{
//Plays the sound of the player putting the crowbar in the doorframe
PlaySoundAtEntity("attachshovel","puzzle_place_jar.snt", "Player", 0, false);


//Sets your crowbar_dyn active
SetEntityActive("NAMEOFYOURCROWBAR_DYN", true);

Noob scripting tutorial: From Noob to Pro

05-15-2012, 09:16 AM
Find


Messages In This Thread
RE: [Tutorial] Use crowbar to open a door - by Cranky Old Man - 05-15-2012, 09:16 AM



Users browsing this thread: 1 Guest(s)