For example I put this script in the death event of an npc (size 200%):
Code: Select all
with npc(sysval(param1))
call ncreate(2,.x,.y-200,0,0,0,0)
end with
When an npc of a size other than 100% I put a script a its special event: and there is an ncreate in the script it doesn't do the same size.
For example I put this script in the death event of an npc (size 200%): Code: Select all with npc(sysval(param1))Programming NPCs in SMBX-38A is fun:
ROCKMAN GIF IN SMBX 38A ![]() | ||
|
I don't think it's a bug, it's rather a suggestion. In your script, how ncreate is supposed to know the size of the npc? Checking the size of the NPC within the "with npc" block doesn't seem like a good method to me. It also means you can't create bigger NPCs unless it is attached to a CNPC script with a bigger size.
I wish there was a second constructor for ncreate, which adds one parameter at the end with is the size of the NPC. This way it would keep compatibility and make "size" optional. It would be also good if we had the value of .size in the npcs. | ||
Programming NPCs in SMBX-38A is fun:
ROCKMAN GIF IN SMBX 38A ![]() | ||
I have noticed that when some npc calls the ncreate function inside one of its events, this call(ncreate) ignores if autoscale is activated.
You can create an npc with different sizes but you must have autoscale activated, I already checked Programming NPCs in SMBX-38A is fun:
ROCKMAN GIF IN SMBX 38A ![]() | ||
Who is online (over the past 5 minutes)Users browsing this forum: 1 guest | ||