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
Help: How to make a lever?
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#2
RE: Help: How to make a lever?

Well, if it's like a normal lever then just add a script area on the side where the lever has to be to activate it. Like on the downside of the lever. I hope you know what I mean <.<

Then use this callback to make the arm a lever.
AddEntityCollideCallback("grunt_body_part1", "ScriptArea_1", "Collide_Armlever", false, 1);

And this function:
void Collide_Armlever(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("whatever", true); //Or whatever you want to do
}
Then when you move the arm, the lever should activate.

I'm not pro or anything so don't shoot me if it doesn't work :<

03-11-2011, 08:54 PM
Find


Messages In This Thread
Help: How to make a lever? - by Acies - 03-11-2011, 01:56 PM
RE: Help: How to make a lever? - by Viperdream - 03-11-2011, 08:54 PM
RE: Help: How to make a lever? - by Nye - 03-12-2011, 12:48 AM
RE: Help: How to make a lever? - by nkmol - 03-12-2011, 10:39 AM
RE: Help: How to make a lever? - by Acies - 03-12-2011, 07:43 PM
RE: Help: How to make a lever? - by Acies - 03-17-2011, 05:49 PM
RE: Help: How to make a lever? - by Pandemoneus - 03-17-2011, 05:59 PM
RE: Help: How to make a lever? - by Acies - 03-17-2011, 10:39 PM



Users browsing this thread: 1 Guest(s)