The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Poll: Did you find this tutorial useful?
You do not have permission to vote in this poll.
Yes, I liked it.
100.00%
17 100.00%
No.
0%
0 0%
Total 17 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a rope
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#1
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:

[Image: OLyrJ.jpg]

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)
[Image: k6vbdhu]

Aculy iz dolan.
10-15-2012, 09:48 PM
Find


Messages In This Thread
How to make a rope - by The chaser - 10-15-2012, 09:48 PM
RE: How to make a rope - by Racingcreed - 12-08-2012, 07:59 PM
RE: How to make a rope - by FlawlessHappiness - 12-08-2012, 11:04 PM
RE: How to make a rope - by VeNoMzTeamHysterical - 01-03-2013, 11:49 PM
RE: How to make a rope - by FlawlessHappiness - 01-15-2013, 08:59 PM
RE: How to make a rope - by The chaser - 01-15-2013, 09:50 PM
RE: How to make a rope - by FlawlessHappiness - 01-15-2013, 10:01 PM
RE: How to make a rope - by The chaser - 01-15-2013, 10:08 PM
RE: How to make a rope - by FlawlessHappiness - 01-15-2013, 10:16 PM
RE: How to make a rope - by The chaser - 01-15-2013, 10:25 PM
RE: How to make a rope - by FlawlessHappiness - 01-15-2013, 10:50 PM
RE: How to make a rope - by FlawlessHappiness - 02-15-2013, 06:38 PM
RE: How to make a rope - by The chaser - 02-15-2013, 10:14 PM
RE: How to make a rope - by plutomaniac - 04-08-2013, 08:54 PM
RE: How to make a rope - by The chaser - 04-08-2013, 09:58 PM
RE: How to make a rope - by Putmalk - 04-09-2013, 04:35 AM
Rope Creation Tutorial - by Putmalk - 04-06-2013, 04:59 AM
RE: Rope Creation Tutorial - by PutraenusAlivius - 04-06-2013, 05:17 AM
RE: Rope Creation Tutorial - by Putmalk - 04-06-2013, 05:39 AM



Users browsing this thread: 3 Guest(s)