The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
How to make a rope
Hello everyone! \0
A lot of users have been wondering how to make an usable rope. It's a bit hard to see in the scripts of the main game, but here you can see how you can make a rope.
1: Open the desired level to use the rope. Choose the location where the rope is going to be. Then, put a movable entity (I'm going to use a crank_wheel)
2: Now, go to areas: There are a lot but we are going to use two: Rope area and PosNode.
The rope area is where the rope begins, so place it wisely. Now, place the Rope area here:
Ok, now copy and paste the following destination:
rope_default_normal.rope
The green area at the bottom of the image is the PosNode. Don't edit anything.
3: As you can see in the image, there is an invisible box mass. That box mass is linked to the rope and pos node, so it will move with it.
BUT: There isn't the most important thing:
THE SCRIPT
void OnStart()
{
InteractConnectPropWithRope("WellRope","crank_wheel_1", "RopeArea_1", false, 3,5,5, false, 0);
AddUseItemCallback("MeatOnRope", "fresh_meat_1", "crank_wheel_1", "UseMeatOnRope", false);
}
void UseMeatOnRope(string &in asItem, string &in asEntity)
{
AddAttachedPropToProp("invisible_box_mass_3", "fresh_meat_onrope_1", "fresh_meat_onrope.ent", 0,0,0, 0,0,0);
This is the script: The ICPWR connects the crank_wheel_1 with the rope area. This will make the rope movable. But, this doesn't finish here. As in the main game, we have to pull down a piece of meat. So, we use an AUIC.
This says that when we use the fresh meat in the crank wheel, the UseMeatOnRope will happen. This UseMeatOnRope attachs the fresh_meat_on_rope_1 (with the internal name fresh_meat_onrope.ent) to the invisible_box_mass_3. Now, to get sure something happens, when the meat touches an area (which is at the final of the rope) an armor will spawn. The armor is called servant_grunt_1.
THE FINAL SCRIPT
void OnStart()
{
InteractConnectPropWithRope("WellRope","crank_wheel_1", "RopeArea_1", false, 3,5,5, false, 0);
AddUseItemCallback("MeatOnRope", "fresh_meat_1", "crank_wheel_1", "UseMeatOnRope", false);
}
void UseMeatOnRope(string &in asItem, string &in asEntity)
{
AddAttachedPropToProp("invisible_box_mass_3", "fresh_meat_onrope_1", "fresh_meat_onrope.ent", 0,0,0, 0,0,0);
AddEntityCollideCallback("fresh_meat_onrope_1", "ScriptArea_1", "BLA", false, 1);
}
void BLA (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
}
Ropes are a bit tricky but they are cool to use.
Hope you find this tutorial useful!
-The chaser
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-15-2012, 09:48 PM |
|
Racingcreed
Junior Member
Posts: 39
Threads: 12
Joined: Dec 2012
Reputation:
3
|
RE: How to make a rope
Oh, thanks!
I wasn't even aware this feature was in the game, (haven't finished the story yet, too scared) should come in handy for making my story though, thanks a bunch!
Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B
|
|
12-08-2012, 07:59 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to make a rope
I love your signature makes me rely much more on you when reading the article...
Though very nice! Nobody did that before I give you credit
Trying is the first step to success.
|
|
12-08-2012, 11:04 PM |
|
VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
RE: How to make a rope
Sick!!!!
It helped me alot
thanks
|
|
01-03-2013, 11:49 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to make a rope
Ok, so my rope is now hanging from the ceiling, but when i bump into it it doesn't seem to follow the gravity as well as i do.
It goes slowly back to it's place... is that normal?
Trying is the first step to success.
|
|
01-15-2013, 08:59 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How to make a rope
(01-15-2013, 08:59 PM)BeeKayK Wrote: Ok, so my rope is now hanging from the ceiling, but when i bump into it it doesn't seem to follow the gravity as well as i do.
It goes slowly back to it's place... is that normal?
Could you please explain me detailedly what's your problem, please? There are a lot of factors which can affect the rope's behaviour.
So, you say it's like... like if the rope fell slowly down? Now that's quite strange. A screenie of the place of the rope would be good to see
This means you looked my tutorial! Thx u tru fren
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
01-15-2013, 09:50 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to make a rope
No, don't matter what i just wrote, it's ok.
It looks fine, it's just me.
So i have another question.
Would it be possible to attach a key to the rope, and after that being able to pick up the key, if you slide down the rope?
Trying is the first step to success.
|
|
01-15-2013, 10:01 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How to make a rope
Ofc, you can attach whatever you want to the body at the final of the rope
So:
I guess you are talking about moving the rope so you can get the key, right? In that case, just put a wheel somewhere connected to the rope (as my tutorial says):
"InteractConnectPropWithRope("WellRope","crank_wheel_1", "RopeArea_1", false, 3,5,5, false, 0);"
So, instead the crank_wheel, you can use whatever you want: Just move the wheel and the key will go down, as it should. It's kinda like a sticky area, but movable.
And, as my signature says (now in dolanish language)
"Turst meh, imman egnieer"
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
01-15-2013, 10:08 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to make a rope
But...
When i attach the key, i cannot pick it up. I guess that's maybe because it's inside the BlockBox.
Also if i jump into the key it makes some weird rotations.
Finally i cannot rotate the key properly. It magically disappears when i try to rotate it 90 degrees
This is my script without the rotation thingy.
The rope works fine, except for the key
void OnStart()
{
InteractConnectPropWithRope("Rope_1","valve_iron_rusty_1", "RopeArea_1", false, 3,5,5, false, 0);
InteractConnectPropWithRope("Rope_2","valve_iron_rusty_1", "RopeArea_2", false, 3,5,5, true, 0);
AddAttachedPropToProp("invisible_box_mass_3", "key_laboratory_1", "key_laboratory.ent", 0, 0, 0, 0, 0, 0);
}
Trying is the first step to success.
|
|
01-15-2013, 10:16 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How to make a rope
It will be a matter of attached... Hmmm... do dis, tru fren:
void OnStart() //This could change!
{
AddEntityCollideCallback("Da_box_in_da_rope", "Area", "Interact", true, 1); ///When the rope is down, it will collide with this area, which will activate an area *look down*
}
void Interact (string &in asParent, string &in asChild, int alState)
{
///I don't know how to make an area interactable, so yea... make an area which you can touch. The interaction with it will give you the item (key). Sorry for this little thing. When you interact, it will:
GiveItem("Key", "Item", "Puzzle", "key.tga", 1);
SetEntityActive("Da_key_in_da_box", false);
}
You can make the box smaller than the key so it doesn't collide with the outer of the key.
THE OTHERWORLD (WIP)
Aculy iz dolan.
(This post was last modified: 01-15-2013, 10:26 PM by The chaser.)
|
|
01-15-2013, 10:25 PM |
|
|