[Solved] Is there a way to "glue" something to the player?

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

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 216
Posts: 498
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 15 Jun 2016, 3:19

I'm making a boss and I was wondering if there's a way to attach something the player so that it is sticking to it. I mean, I want to do something like a "shooting game" with the player and I need a NPC stick to the player (in this case I used NPC-10, the SMB3 coin) at a particular time, but not how to do it (tried do so by NPCs but movements are not as accurate as I need...)

Is there any way of doing this? perhaps there's a way to convert the player position in a variable and this variable let me to build a script, or maybe there is some script that allows me to do this through a special function, really not sure. Any help is welcome! I really need to know if this can be done, it would save a lot of work. Thanks!

Here's a picture about what I'm trying to do:
Spoiler
Image
[size=100][b]VISIT MY YOUTUBE CHANNEL![/b] [url=https://www.youtube.com/channel/UC_AcXEExdYtaydxcCVPSGoQ]LX XZIT[/url][/size]
[size=100]Join our 38A Discord server! [url= https://discord.gg/7hCmNBE]CLICK HERE[/url][/size]

TheCreator520
Our friend
Our friend
Avatar
TheCreator520
Our friend
Our friend
Reputation: 59
Posts: 78
Joined: 21 Feb 2016

Post #2by TheCreator520 » 25 Jun 2016, 6:46

npc-xxx.txt:
scripts=glue

scripts editor > glue
with npc(sysval(param1))
.X = char(1).X
.Y = char(1).Y
end with

hope it can help you :)
Image

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 216
Posts: 498
Joined: 9 Nov 2015
Website

Post #3by Lx Xzit » 25 Jun 2016, 20:36

Thank you so much! this will be definitely helpful, not only for this boss, but it'll be helpful for a lot of levels :D
[size=100][b]VISIT MY YOUTUBE CHANNEL![/b] [url=https://www.youtube.com/channel/UC_AcXEExdYtaydxcCVPSGoQ]LX XZIT[/url][/size]
[size=100]Join our 38A Discord server! [url= https://discord.gg/7hCmNBE]CLICK HERE[/url][/size]

ELY_M M
Good citizen
Good citizen
ELY_M M
Good citizen
Good citizen
Reputation: 3
Posts: 20
Joined: 6 Jun 2016

Post #4by ELY_M » 31 Jul 2017, 20:53

good idea for attaching a gun to mario in my level HAHAHAHHAHAHAH

Added after 9 minutes 8 seconds:
I just tried to glue a billy gun or other gun to mario. It do not cause the gun to fire as it should.
I know there are two guns in the smbx 38A.
npc-22 and npc-279


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest