Ncreate parameters

Description: Report bugs of SMBX-38A here.
Forum rules: https://wohlsoft.ru/forum/viewtopic.php?f=64&t=1069
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Prado M
Topic author, Honourable citizen
Honourable citizen
Avatar
Prado M
Topic author, Honourable citizen
Honourable citizen
Age: 19
Reputation: 2
Posts: 49
Joined: 14 Sep 2015
Location: Brazil

Post #1by Prado » 19 Oct 2016, 2:01

What are the last 2 parameters of Ncreate supposed to do:

Ncreate(... advset, cdata)

I'm reading the rotating flamethrower example, but without this info it's hard to understand.
Discord server to play SMBX online via Parsec!

https://discord.gg/FftYYMv

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 19
Reputation: 142
Posts: 679
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #2by Yoshi021 » 20 Oct 2016, 0:49

I'm not sure what they do, but I think they are when you are making really complex NPC scripts
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

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 #3by PK Esper » 20 Oct 2016, 16:53

[NCreate]
NCreate(id, x, y, sx, sy, advset, cdata)
Returns the permanent ID(double type) of the NPC created.
id(Double) type-ID of the NPC , eg: 1 for a goomba
x(Double) x-position of the NPC
y(Double) y-position of the NPC
sx(Double) x-axis speed of the NPC
sy(Double) x-axis speed of the NPC
advset(Double) additional data of the NPC.Default:0
cdata(Double) creation information.Default:0

The permanent ID returned will become effective in the next frame of the creation.The NPC is not really created immediately in the frame the script is executed.


I read this on .rtf SMBx Scripting Help. On procedures.
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

Prado M
Topic author, Honourable citizen
Honourable citizen
Avatar
Prado M
Topic author, Honourable citizen
Honourable citizen
Age: 19
Reputation: 2
Posts: 49
Joined: 14 Sep 2015
Location: Brazil

Post #4by Prado » 20 Oct 2016, 22:58

Still didn't help... I already read the help file
Discord server to play SMBX online via Parsec!

https://discord.gg/FftYYMv

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

Post #5by TheCreator520 » 21 Oct 2016, 8:40

.advset is the advanced setting number of an npc , for example , if you place a flying koopa and don't change it's variantion , it'll jump and the .advset of the flying koopa is 1 . But if you open the advanced setting window of the flying koopa and turn "Jump" to "Chase" , the .advset turns to 0 from 1 .
Every npc's .advset would make the npcs to have different movements . ( except the npcs with only one way to move . )
the cdata is the way that the npc spawn . for example , if the number is 0 the npc will spawn instandly . if the cdata is 5 the npc will be warped out .
Hope it can help you ;)
Image

Prado M
Topic author, Honourable citizen
Honourable citizen
Avatar
Prado M
Topic author, Honourable citizen
Honourable citizen
Age: 19
Reputation: 2
Posts: 49
Joined: 14 Sep 2015
Location: Brazil

Post #6by Prado » 21 Oct 2016, 18:48

TheCreator520 wrote:.advset is the advanced setting number of an npc , for example , if you place a flying koopa and don't change it's variantion , it'll jump and the .advset of the flying koopa is 1 . But if you open the advanced setting window of the flying koopa and turn "Jump" to "Chase" , the .advset turns to 0 from 1 .
Every npc's .advset would make the npcs to have different movements . ( except the npcs with only one way to move . )
the cdata is the way that the npc spawn . for example , if the number is 0 the npc will spawn instandly . if the cdata is 5 the npc will be warped out .
Hope it can help you ;)

But in the rotating flamethrower example, Ncreate() is used to create npc-340, which is the flamethrower, and it has 3 different fields to adjust:

- Angle
- Delay
- Lenght

So how can only one number set all those 3 parameters?
Discord server to play SMBX online via Parsec!

https://discord.gg/FftYYMv

KFCMARIO
Good citizen
Good citizen
Avatar
KFCMARIO
Good citizen
Good citizen
Reputation: 21
Posts: 33
Joined: 25 Jan 2016

Post #7by KFCMARIO » 21 Oct 2016, 19:02

Prado wrote:
But in the rotating flamethrower example, Ncreate() is used to create npc-340, which is the flamethrower, and it has 3 different fields to adjust:

- Angle
- Delay
- Lenght

So how can only one number set all those 3 parameters?

3 paramters could finally be saved as one variable(.advset), look the flamethrower example and you will know how it archive

Prado M
Topic author, Honourable citizen
Honourable citizen
Avatar
Prado M
Topic author, Honourable citizen
Honourable citizen
Age: 19
Reputation: 2
Posts: 49
Joined: 14 Sep 2015
Location: Brazil

Post #8by Prado » 22 Oct 2016, 0:38

I realized that I need urgent help to understand this example :SOS:
Discord server to play SMBX online via Parsec!

https://discord.gg/FftYYMv


Return to “Bug reports”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest