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.
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. | ||
|
[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. | ||
.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? | ||
3 paramters could finally be saved as one variable(.advset), look the flamethrower example and you will know how it archive | ||
Who is online (over the past 5 minutes)Users browsing this forum: 1 guest | ||