Rotated NPC?

Description: Subforum dedicated to SMBX-38A - a fan-made remake of the original SMBX Engine, made by 5438A38A.
Forum rules: This is official Europan/American community for the SMBX-38A. Suggested to don't post stuff for this engine outside this subforum.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

NajekK M
Topic author, Nice citizen
Nice citizen
Avatar
NajekK M
Topic author, Nice citizen
Nice citizen
Reputation: 20
Posts: 15
Joined: 5 Jan 2017
Location: Poland

Post #1by NajekK » 5 Jan 2017, 20:41

Hi!
I have a question. Is 1.4.3 rotation of any NPC and not just those that are in the settings: "angle"?

I will be grateful for your help :)
Image

PK Esper F
Lord
Lord
Avatar
PK Esper F
Lord
Lord
Age: 13
Reputation: 107
Posts: 520
Joined: 22 Aug 2016
Location: The sky
Website Facebook Google+ Twitter

Post #2by PK Esper » 6 Jan 2017, 9:26

Well,in my mind. The only thing I know is by using the TeaScript(also known as Script for short).

Personally, not any NPC can be rotated. Excluding for an idle object like SMW coins, which it can be rotate. Maybe you should download SMBX 1.4.(pick a version) tho, and when you download it. In your "worlds" folder has an Example folder, and a random episode called "the invasion 2". The example folder includes a level editor features and scripting examples.

Here's the code for the NPC you want to rotate

Code: Select all

Call LSpin("Layernamehere", -PosX+16, -PosY+16, 0.03)

You can also rotate some blocks(or tileset) for example, the SMB3 blocks. It works just like some random NPC did.

I hope this is helpful BTW. ;-)
why i hadn't been in this forum for long when i used to be a super active person
avatar is basically baldi from tumblr
Formerly known as RSupertheGreat.
ImageImage
What I support
ImageImageImage
Personality
Yes, I'm a girl. If you guys are thinking I'm a boy.
I hate most people.
I'm a developer (and a beta tester of):
Image
Image
My level/episode playthrough thread: http://wohlsoft.ru/forum/viewtopic.php?f=29&t=2185

NajekK M
Topic author, Nice citizen
Nice citizen
Avatar
NajekK M
Topic author, Nice citizen
Nice citizen
Reputation: 20
Posts: 15
Joined: 5 Jan 2017
Location: Poland

Post #3by NajekK » 6 Jan 2017, 13:17

Here's the code for the NPC you want to rotate

Code: Select all

Call LSpin("Layernamehere", -PosX+16, -PosY+16, 0.03)

No, I know this code. I don't want to turn around coordinate. I want to rotate the same graphics. Something similar to rotate bitmaps, but npc still to have their property damage, etc.

But your post gave me an idea. Thank you :D
Image

Catskart M
Count
Count
Avatar
Catskart M
Count
Count
Age: 21
Reputation: 145
Posts: 260
Joined: 29 Nov 2015
Location: France

Post #4by Catskart » 6 Jan 2017, 19:49

You can't, or you can make a npc script where you create a bitmap as npc graphic.

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 283
Posts: 648
Joined: 9 Nov 2015
Website

Post #5by Lx Xzit » 6 Jan 2017, 23:18

There is a way, I saw TheCreator520 and KFCMario do it, also one of the "daily tips" says it's possible rotate scripts, but unfortunely, we don't know how to do.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #6by Zwertll » 7 Jan 2017, 19:04

Lx Xzit wrote:There is a way, I saw TheCreator520 and KFCMario do it, also one of the "daily tips" says it's possible rotate scripts, but unfortunely, we don't know how to do.
What npcs you is meaning?

HumanReploidJP M
Good citizen
Good citizen
Avatar
HumanReploidJP M
Good citizen
Good citizen
Age: 20
Reputation: 5
Posts: 25
Joined: 10 Nov 2016
Location: Philippines
Website

Post #7by HumanReploidJP » 4 Feb 2017, 6:11

Lx Xzit wrote:There is a way, I saw TheCreator520 and KFCMario do it, also one of the "daily tips" says it's possible rotate scripts, but unfortunely, we don't know how to do.

Lx Xzit, if you don't know how (except the basic teascript), then PM TheCreator520 and KFCMario with a message saying: HumanReploidJP needs some help to rotate graphical npcs, can you show me the codes plz? I will be grateful for your response ty.

Please respond! :to_keep_order: I will wait for your reply with TheCreator520 and KFCMario ty.
Hi! How y'all doing? Here to make levels and single episode for SMBX 1.4.X that will be coming soon. Have fun!

Current SMBX 1.4 Project: Super Mario Bros. X Team Arceo - Prismarine Legend
Next Project (Soon): Super Mario Bros. X Team Arceo 2 - Continent of Festivity

TheCreator520
Close friend
Close friend
Avatar
TheCreator520
Close friend
Close friend
Reputation: 61
Posts: 86
Joined: 21 Feb 2016

Post #8by TheCreator520 » 4 Feb 2017, 16:49

If you mean the rotating of the bitmap , it's simple and I've send something to the one who needs some help .
If you mean the rotating of npcs themselves , then you'll need some "cos" and "sin" to do it .

Welp , I tried .
This script probably only works with four-npc-rotation , bah , I'll test it later .
npcround.rar
(1.12 KiB) Downloaded 93 times
Image


Return to “Super Mario Bros. X by 38A (SMBX-38A)”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest