(05-15-2012, 09:16 AM)Cranky Old Man Wrote: (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);
//Makes it able for the Crowbar_joint to collide with the area in my case the area is named BreakDoor
BreakDoor is what I call the area the crowbar collides with that calls the function CollideAreaBreakDoor
//Calls a timer that places the crowbar in the door frame.
AddTimer(asEntity, 0.2, "TimerSwitchShovel");
hmm never thought about that, will be changed
//Remove callback incase player never touched door
SetEntityPlayerInteractCallback("NAMEOFDOOR", "", true);
SetEntityPlayerInteractCallback("NAMEOFTHEAREA", "", true);
Doesn't need to be there, changed now
//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);
Changed
//Sets your crowbar_dyn active
SetEntityActive("NAMEOFYOURCROWBAR_DYN", true);
Changed with a better description (I think?)