# 落下の処理を分岐させたい

**URL:** <https://forums.unrealengine.com/t/topic/439062>\
**Category:** Blueprint\
**Tags:** falling, jump, unreal-engine, Blueprint, question\
**Created:** [December 7, 2018, 2:52pm UTC](https://forums.unrealengine.com/t/topic/439062 "2018-12-07T14:52:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shamisen\_matsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shamisen\_matsu](https://forums.unrealengine.com/u/shamisen_matsu)\
**Post date:** [December 7, 2018, 2:52pm UTC](https://forums.unrealengine.com/t/topic/439062/1 "2018-12-07T14:52:08Z")

</div>

ジャンプした時にプリントで「jump」だけ出るようにしたいのですが、

分岐後の「崖から落ちる」の出力もされてしまいます。

分岐方法がこれしか思いつかないのですが良い方法がございましたら教えていただきたいです。

よろしくお願い致します。

 ![261574-ue4落下質問.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/6/ec62bab71b1f16b243391338db99d778ec18f011.png)

---

<div class="post-metadata">

**Author:** ![ands\_model](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ands\_model](https://forums.unrealengine.com/u/ands_model)\
**Post date:** [December 8, 2018, 3:19pm UTC](https://forums.unrealengine.com/t/topic/439062/2 "2018-12-08T15:19:17Z")

</div>

こんにちは。

**ジャンプ時にPrintStringのjumpの出力だけを出したい とのことなので**  
  
**まずIsFallingノードで「キャラクターが地面に接しているか？」のフラグは立てれていると思われます。**  
  
   
  
**なので変数PressedJumpと、繋がっている１つめのブランチを削除して**  
  
**Tickと２つめのブランチを繋ぎ、**  
  
**ブランチのTrueにPrintStringの「Jump」、Falseに「崖から落ちる」を繋いでみたら**  
  
**ジャンプ時にPrintStringのjumpの出力ができないでしょうか。**

 

**一度お試しください！**

---

<div class="post-metadata">

**Author:** ![shamisen\_matsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shamisen\_matsu](https://forums.unrealengine.com/u/shamisen_matsu)\
**Post date:** [December 10, 2018, 1:54pm UTC](https://forums.unrealengine.com/t/topic/439062/3 "2018-12-10T13:54:58Z")

</div>

回答ありがとうございます！このような感じでしょうか？この方法ですと望んでいた結果にはなりませんでした。  
ジャンプの時はjumpだけ出力されるようになりましたが、段差から降りて地面から離れた時もジャンプ判定になってしまいました。

説明不足でしたが、ジャンプで地面から離れた時と、歩きから段差を降りる時の処理を分けたいと考えていました。

 ![261857-ue4落下質問2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/d/c3db6ef994a2cc03faf54f276afc5ee672b28e62.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6592e8c0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6592e8c0](https://forums.unrealengine.com/u/anonymous_user_6592e8c0)\
**Post date:** [December 11, 2018, 4:39am UTC](https://forums.unrealengine.com/t/topic/439062/4 "2018-12-11T04:39:22Z")

</div>

[Event Tick]─[Branch]───[Print String:jump]  
…┃  
…┗━[Branch]━━[PrintString：崖から落ちる]

1つめのブランチのFalse（→崖から落ちる）方向に、[Pressed Jump]のブランチを追加して、Falseに「崖から落ちる」を繋いだらいかがでしょうか？

---

<div class="post-metadata">

**Author:** ![shamisen\_matsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shamisen\_matsu](https://forums.unrealengine.com/u/shamisen_matsu)\
**Post date:** [December 11, 2018, 2:40pm UTC](https://forums.unrealengine.com/t/topic/439062/5 "2018-12-11T14:40:07Z")

</div>

a-zaki様、回答ありがとうございます！このような感じでしょうか？  
試してみたところ段差から落ちた時にjump判定にされてしまいました。

 ![261946-ue4落下質問3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/2/382a00b4638b942f02f91921723fcc61e16988ad.png)

---

<div class="post-metadata">

**Author:** ![shamisen\_matsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shamisen\_matsu](https://forums.unrealengine.com/u/shamisen_matsu)\
**Post date:** [December 11, 2018, 3:27pm UTC](https://forums.unrealengine.com/t/topic/439062/6 "2018-12-11T15:27:36Z")

</div>

解決できました！後から「崖から落ちる」が実行されるなら処理を一回しかしなければよいのでは？と考えDO ONCEを使って試したところ上手くいきました。

 ![261949-ue4落下解決.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/e/91e58b03e352eda28080589d52118f1616000d66.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6592e8c0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6592e8c0](https://forums.unrealengine.com/u/anonymous_user_6592e8c0)\
**Post date:** [December 12, 2018, 2:42pm UTC](https://forums.unrealengine.com/t/topic/439062/7 "2018-12-12T14:42:06Z")

</div>

解決されてよかったです！

もし問題が完全に解決済みでしたら、トピックも解決済みにされると、後から調べたい方がわかりやすくなるそうです。（↓解決済にするやり方です）  
[https://answers.unrealengine.com/questions/687897/answerhub-クイックスタートヘルフ日本語訳.html](https://answers.unrealengine.com/questions/687897/answerhub-%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88%E3%83%98%E3%83%AB%E3%83%95%E6%97%A5%E6%9C%AC%E8%AA%9E%E8%A8%B3.html)

---

<div class="post-metadata">

**Author:** ![shamisen\_matsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shamisen\_matsu](https://forums.unrealengine.com/u/shamisen_matsu)\
**Post date:** [December 12, 2018, 2:50pm UTC](https://forums.unrealengine.com/t/topic/439062/8 "2018-12-12T14:50:15Z")

</div>

教えていただきありがとうございます。わからないことがあったらまた質問したいと思います。
