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?
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#1
Help: How to make a lever?

Hi, excuse me for being lazy but sometimes asking makes a thing much easier. What I want to do:

1. Take "grunt_body_part1.ent" then attach it to a body (corpse_male_plague_cistern_1). This I know how to do.
2. Make that arm a lever.

How do I do step 2 the easiest way - by scripting or by working in the model editor?

Hope someone has experience with this! Smile

Thanks in advance

Tried making a lever in the model editor, but when I add it to the map it gives me a crash report.

[Image: mZiYnxe.png]


(This post was last modified: 03-11-2011, 02:22 PM by Acies.)
03-11-2011, 01:56 PM
Find
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
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#3
RE: Help: How to make a lever?

It is impossible to get this to function as a lever without creating custom joints (in the model editor). I can't do this, so don't ask me how Tongue

The alternative is to do what Viperdream said and have no animation (unless you want to add particle/player effects) once the player interacts with the hand. However, I don't think this is what you wanted Dodgy

03-12-2011, 12:48 AM
Find
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#4
RE: Help: How to make a lever?

It isn't hard to make it in the Model editor, you can just see how it's done whith the normal lever. I made a couple of models too Smile Whith the crash problem i can't help you, got the same problem though -.-
03-12-2011, 10:39 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#5
RE: Help: How to make a lever?

Yes, I found it easy to make it in the model editor. The crash frustrates me though. I want to solve it.

[Image: mZiYnxe.png]


03-12-2011, 07:43 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: Help: How to make a lever?

Anyone? Someone who knows how to make a lever in the model editor?

(A lever which does not crash the map)

[Image: mZiYnxe.png]


03-17-2011, 05:49 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#7
RE: Help: How to make a lever?

Got no experience with the model editor, sorry.

03-17-2011, 05:59 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#8
RE: Help: How to make a lever?

It cost me dearly on the sanity-meter, but I managed to get it to work.

If someone would be interested in how I could explain certain steps which might be confusing. The rest is simply copy-paste from an original lever.

[Image: mZiYnxe.png]


03-17-2011, 10:39 PM
Find




Users browsing this thread: 1 Guest(s)