• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

[Lập Trình Game] Lesson 7: Move between levels when completing a mission

AnonyViet by AnonyViet
February 2, 2023
in Tips
0

Continuing the series, today ad will continue part 7 which is moving between levels. Can be understood as moving back and forth to edit the senses. To learn about sence, please review from Lesson 0 of Game programming series with Godot. As for the level, do you guys play the game? mmorp then understand it is a level but in this it is a game screen. For example, if you play argry bird after stage 1, you will see that stage 2 is the Level I mentioned here. Without further ado, let’s get started.

Join the channel Telegram of the AnonyViet 👉 Link 👈

Create New Sense

The first step is to create a new sense for yourself with the button “+” next to the sence tab World

Move between levels

Okay like this:

programming godot game through level

Choose for yourself Other Node then press enter.Note select other node then press enter don’t press anything else. It will give you the black button

[Lập Trình Game]  Lesson 7: Move between levels when completing quest 22

And we’ll need to save Node Player and Node Tilemap about as .tscn to be able to put it into another sence without redoing it. And the like Node other like enemy nice trap

By the following way:

You right click on Node Player And Node Tilemap Choose for yourself Save Branch As Sense

That means it will save the node you just selected as tscn and in this tscn you can put your node in any sence without doing another one.

Move between levels when completing missions

You can leave it anywhere. But remember to create a folder containing files like this for compactness.

Here I will save it in the folder tscn

[Lập Trình Game]  Lesson 7: Move between levels when completing quest 23

In the folder you will see there 2 tscn just saved as Tilemap and Player

[Lập Trình Game]  Lesson 7: Move between levels when completing task 24

And next is Import Tscn enter sense

Choose the one in the picture:

[Lập Trình Game]  Lesson 7: Move between levels when completing the mission 25

==>

[Lập Trình Game]  Lesson 7: Move between levels when completing missions 26

And here you will see there are 2-4 node It depends on your tscn. Mine has 3:

  • 1 is Player.
  • 2 is TileMap.
  • 3 Is Level 1 is World

[Lập Trình Game]  Lesson 7: Moving between levels when completing a mission 27

You guys Instance 2 is Player and TileMap come in

And you’ll see it’s like old sense

[Lập Trình Game]  Lesson 7: Move between levels when completing quest 28

Note: In tilemap you may not need to save it as tscn anymore, just create a tilemap node and then enter the tileset and design a new level, if you want this sence to be different

Well, you guys like to save this sence 2 for yourself as level 2 and save it in a certain folder, mine is in the sence folder and Click Ctrl + WILL to save

And below is my level 2. Next we will create an object that moves between levels

[Lập Trình Game]  Lesson 7: Move between levels when completing quests 29

Creating Sense Move Object

To move between levels you will need to create a Move Sense Object. First, you create your own node area2D live sense 1 Please

[Lập Trình Game]  Lesson 7: Move between levels when completing a mission 30

Add me 2 in Area 2D

[Lập Trình Game]  Lesson 7: Move between levels when completing quest 31

In the Sprite section, you put your photos in and you can find them online

And here is my picture:

[Lập Trình Game]  Lesson 7: Move between levels when completing mission 32

After running the game

[Lập Trình Game] Lesson 7: Move between levels when completing a mission

Next, you create yourself a new script in Area2D

Then the code is as follows

[Lập Trình Game]  Lesson 7: Move between levels when completing a mission 34

Here below:

Part export(String,FILE,"*.tscn") var next_world this is the part it will take this out of the node’s settings and you can put tscn in there for it to point to

get_overlapping_boides is a function that helps you check the bodies inside collection bodies enter collsion it will do something.

for body in boides: for body in boides (just declared above) means that if a body is inside the boides it will execute the if statement below. this body is a command of this node, the body here is kinematicbody and staticbody

if body.name == player: body.name ie body and then get its name if by Player it will execute the command below. Well, the “Player” is the name of your Player node. If your Node player has any name, you must replace it with “Player” to be effective.

get_tree.change_sence this is an order of Godot help you move from sense this is sense other (next_world) is the function we declared above export.speak for easy understanding in Export it will allow you to give 1 sense Go in and then below if player touch the Object Move Sense then it will move Player arrive sense in the section Export

Next, you save it and return to the sence, you will see there Next World live Node Area2D Right side of the Place Script Variables.

[Lập Trình Game]  Lesson 7: Move between levels when completing a mission 35

Next, you click on the folder next to next world and choose the second sence

[Lập Trình Game]  Lesson 7: Move between levels when completing mission 36

And it will be

[Lập Trình Game]  Lesson 7: Move between levels when completing the mission 37

Ah and we have to set collection for area2D Then the Player can move to another level

I have set it up and it can move to another level

[Lập Trình Game]  Lesson 7: Move between levels when completing mission 38

And if you want better, you can do the following:

Set limit camera How much is it on the right, then adjust collsion of the sprite area2d behind the camera limit. When the camera reaches the number you set it will no longer move and after you move behind the limit camera player will be moved.

[Lập Trình Game]  Lesson 7: Move between levels when completing mission 39

[Lập Trình Game]  Lesson 7: Move between levels when completing a mission 40

The article achieved: 5/5 – (100 votes)

Tags: completingGamelậpLessonLevelsmissionMovetrình
Previous Post

Download WonderFox HD Video Converter Factory Pro v17.1

Next Post

Download Quick Batch File Compiler 4.3 – Convert .bat extension to .exe

AnonyViet

AnonyViet

Related Posts

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill
Tips

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Instructions for registering for OxionAI Pro for 1 year with many powerful AI models
Tips

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?
Tips

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
Instructions for using CleanYourTV: Remove ads on Android TV, Google TV
Tips

Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

October 23, 2026
How to use Messenger without a Facebook account
Tips

How to use Messenger without a Facebook account

October 22, 2026
The website helps you draw beautifully like TikToker Viet My
Tips

The website helps you draw beautifully like TikToker Viet My

October 21, 2026
Next Post
Download Quick Batch File Compiler 4.3 – Convert .bat extension to .exe

Download Quick Batch File Compiler 4.3 - Convert .bat extension to .exe

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Instructions for installing CleanYourTv to remove Android TV ads

Instructions for installing CleanYourTv to remove Android TV ads

October 29, 2026
How to play the mosquito swatter game, calling students’ names and asking them to return their homework

How to play the mosquito swatter game, calling students’ names and asking them to return their homework

October 28, 2026
Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Postpaid for new employees: Should you start using it?

Postpaid for new employees: Should you start using it?

October 26, 2026
Instructions for installing CleanYourTv to remove Android TV ads

Instructions for installing CleanYourTv to remove Android TV ads

October 29, 2026
How to play the mosquito swatter game, calling students’ names and asking them to return their homework

How to play the mosquito swatter game, calling students’ names and asking them to return their homework

October 28, 2026
Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Instructions for installing CleanYourTv to remove Android TV ads

Instructions for installing CleanYourTv to remove Android TV ads

October 29, 2026
How to play the mosquito swatter game, calling students’ names and asking them to return their homework

How to play the mosquito swatter game, calling students’ names and asking them to return their homework

October 28, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply