Browse Search Popular Register Upload Rules User list Login:
Search:
warphole ワープホール

Image:
screenshot of the scene

Author: -JP-Unajyuu_Algodoo

Group: Default

Filesize: 17.82 kB

Date added: 2025-08-04

Rating: 5

Downloads: 211

Views: 53

Comments: 0

Ratings: 1

Times favored: 0

Made with: Algodoo v2.2.4

Tags:

Scene tag

日本語/English
スクリプトメニューで設定を行-
っております。

左のワープは直接座標を指-
して位置を変えています。

OnCollide = とは、その名の通り何かが自分に触れた際に-
実行するプログラムを記述する場所です。
e.-
other.pos = [x,y]では、other(自分に触れた物体)のpos(位置)-
[横座標,y座標]で変更しています。
e.other.vel-
では自分に触れた物体の速度[x軸速度,y軸速-
]を0にしています。もし仮に光の速度でワー-
プホールに突撃しても、移動先では速度がリ-
セットされるようになっています。リセット-
したくない場合は、この記述を外して下さい-


右のワープではワープホールに入った際-
出てくる場所を物体の位置で決めます。(-
々言い方が難しい。)要するにブラックホ-
ルとホワイトホールの位置を決めるという-
です。

ブラックホール側の(緑、水色の-
方形)Oncollideを見てみましょう。先ほどと-
っているのは、e.other.pos = *scene.my.tp5;*というところです。
これはtp5の-
所に移動するという意味です、

続いてホワ-
イトホール(赤、黄色の正方形)を見ていきま-
ょう。Poststepに、 scene.my.tp5 = posという記述があります。私も詳しいことは-
よくわかりませんが、おそらくtp5を現在の場-
所としているのでしょう。

つまり、tp5変数-
ホワイトホールの座標[x座標、y座標]に-
て、ブラックホールに触れたものをホワイ-
ホールへテレポートさせているという事で-


These settings are made in the script menu.

The warp on the left changes its position by directly specifying coordinates.

OnCollide =, as the name suggests, is where you write the program to be executed when something touches you.
e.other.pos = [x,y] changes the pos (position) of the other (the object that touched you) using the [abscissa, y] coordinates.
e.other.vel sets the speed [x-axis speed, y-axis speed] of the object that touched you to 0. Even if you were to charge into the warp hole at the speed of light, your speed will be reset at your destination. If you don't want this to be reset, remove this line.

The warp on the right determines the exit point from the warp hole based on the object's position. (This is a little difficult to explain.) Essentially, it determines the positions of the black hole and white hole.

Let's look at Oncollide on the black hole side (green and light blue squares). The difference from before is e.other.pos = *scene.my.tp5;*.
This means it will move to location tp5.

Next, let's look at the white hole (the red and yellow square). In the poststep, we see the statement scene.my.tp5 = pos. I don't really understand the details, but it probably means that tp5 is the current location.

In other words, the tp5 variable is set to the coordinates [x coordinate, y coordinate] of the white hole, and anything that touches the black hole is teleported to the white hole.
Last edited at 2025/08/04 04:29:36 by -JP-Unajyuu_Algodoo
Please log in to rate this scene
edit