Attach a layer to the player?

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Yoshi021, Lx Xzit, 5438A38A, Moderators, Semi-moderatos

9th_core
Topic author, Honourable citizen
Honourable citizen
9th_core
Topic author, Honourable citizen
Honourable citizen
Reputation: 0
Posts: 36
Joined: 17 Aug 2016

Post #1by 9th_core » 6 May 2017, 7:43

Hello. I have a question: can you attach a layer to the player? Or at least make it move with you?
I am trying to make an outer-space level where you need to stop the meteorite Bowser sent from reaching Earth.
You always see Earth and the Meteorite in the background and it acts like a timer; (I already know how to do it)
But the following? Thanks for taking the time to reply! :)

Erwill M
Viscount
Viscount
Avatar
Erwill M
Viscount
Viscount
Age: 25
Reputation: 190
Posts: 303
Joined: 29 Nov 2015

Post #2by Erwill » 6 May 2017, 8:03

- Att-Player1(name) : The layer is attached to the player 1.
- Att-Player2(name) : The layer is attached to the player 2.
- Att-Screen(name) : The layer is attached to the main screen.
- Att-ScreenII(name) : The layer is attached to the player 2's screen.

9th_core
Topic author, Honourable citizen
Honourable citizen
9th_core
Topic author, Honourable citizen
Honourable citizen
Reputation: 0
Posts: 36
Joined: 17 Aug 2016

Post #3by 9th_core » 6 May 2017, 8:15

How to integrate that into a script? I tried puttin Att-Screen(Metandplanet) and it doesn't work.
"1 errors detected compiling the scripts.
Scripts with errors are disabled.
Error '12' occured compiling the script!
Invalid expression.
Error in script 'Attach' line1:
Att-Screen(Metandplanet)'

Erwill M
Viscount
Viscount
Avatar
Erwill M
Viscount
Viscount
Age: 25
Reputation: 190
Posts: 303
Joined: 29 Nov 2015

Post #4by Erwill » 6 May 2017, 18:33

9th_core wrote:How to integrate that into a script? I tried puttin Att-Screen(Metandplanet) and it doesn't work.
"1 errors detected compiling the scripts.
Scripts with errors are disabled.
Error '12' occured compiling the script!
Invalid expression.
Error in script 'Attach' line1:
Att-Screen(Metandplanet)'

It isn't a script command, it's a special layer name.

Toshiie M
Good citizen
Good citizen
Avatar
Toshiie M
Good citizen
Good citizen
Age: 21
Reputation: 4
Posts: 29
Joined: 6 Nov 2017

Post #5by Toshiie » 26 Nov 2017, 18:15

Catskart wrote:It isn't a script command, it's a special layer name.

Can you show how to do it with pics?
Image
Image
Image

Eri7 M
Viscount
Viscount
Avatar
Eri7 M
Viscount
Viscount
Age: 22
Reputation: 110
Posts: 389
Joined: 19 Dec 2016
Location: Germany, Bonn
Youtube channel URL Twitter

Post #6by Eri7 » 26 Nov 2017, 19:46

Just create a layer called ,,Att-Player1(name)" and put things in this layer , they will follow the player.
Join the discord server about Nova Projects.
Image

Image

Image

Toshiie M
Good citizen
Good citizen
Avatar
Toshiie M
Good citizen
Good citizen
Age: 21
Reputation: 4
Posts: 29
Joined: 6 Nov 2017

Post #7by Toshiie » 26 Nov 2017, 21:10

Eri7 wrote:Just create a layer called ,,Att-Player1(name)" and put things in this layer , they will follow the player.

And on the (name) i need no place something, or is it just the name of the layer?
Edit: Just found out, thanks
Image
Image
Image


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 5 guests