Smbx 1.4.5: size mistake

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

NESTED ERNEST M
Topic author, Marquis
Marquis
Avatar
NESTED ERNEST M
Topic author, Marquis
Marquis
Reputation: 29
Posts: 193
Joined: 23 Sep 2017
Location: Perú, Lima
Website

Post #1by NESTED ERNEST » 16 Apr 2020, 6:46

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))
   call ncreate(2,.x,.y-200,0,0,0,0)   
end with


dsaaa.gif
dsaaa.gif (44.94 KiB) Viewed 148 times
Programming NPCs in SMBX-38A is fun:

ROCKMAN GIF IN SMBX 38A

Image

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 326
Posts: 702
Joined: 9 Nov 2015
Website

Post #2by Lx Xzit » 16 Apr 2020, 21:12

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.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

NESTED ERNEST M
Topic author, Marquis
Marquis
Avatar
NESTED ERNEST M
Topic author, Marquis
Marquis
Reputation: 29
Posts: 193
Joined: 23 Sep 2017
Location: Perú, Lima
Website

Post #3by NESTED ERNEST » 16 Apr 2020, 22:49

This post is similar to this post I made.

viewtopic.php?f=64&t=3096&p=18635#p18635
Programming NPCs in SMBX-38A is fun:

ROCKMAN GIF IN SMBX 38A

Image


Return to “Bug reports”