Smbx -1.4.5: Id lost(fixed path 24)
Posted: 17 Oct 2019, 20:11
I have noticed that when an npc dies (of any kind as power-ups) in the first moment of the game (or rather in the first frame) the id is lost:
When no npc dies in the first frame:
This is the way I program npc with pieces: I believe in the first frame of a head (npc main piece) the npc (pieces) by sending to each piece in its .advset the property .permid of the head; I don't know if it's the right way(That was the way I thought), although I feel it is.
(I know this can be avoided, I just inform)
Because you use speed to pass param 'permid', and power-ups can freeze the scene.
In SMBX1.4.5, the NPC will create IMMEDIATELY after ncreate executed, so you can do something like this:
- Spoiler

When no npc dies in the first frame:
- Spoiler

This is the way I program npc with pieces: I believe in the first frame of a head (npc main piece) the npc (pieces) by sending to each piece in its .advset the property .permid of the head; I don't know if it's the right way(That was the way I thought), although I feel it is.
(I know this can be avoided, I just inform)
Because you use speed to pass param 'permid', and power-ups can freeze the scene.
In SMBX1.4.5, the NPC will create IMMEDIATELY after ncreate executed, so you can do something like this:
Code: Select all
dim a as long
a = ncreate(46, char(1).x, char(1).y - 256, 0, 0, 0, 0)
a = getid(a)
npc(a).forecolor_a *= 0.5
npc(a).ysp = -8
npc(a).ivalb = 1