Page 1 of 1

Smbx 1.4.5: sysval(param2)

Posted: 3 Sep 2020, 8:53
by NESTED ERNEST
This doesn't seem to work.

In your Scripting Help document you wrote in a table that npc's death event sends some player id to sysval (param2), but only sends the number 1.

Spoiler
ss.png

For the npc power-ups, you can send to that sysval(param2): the player id(the number of the player who touched it, there can also be more than 2 if it was for a cheat like supermario8)

These are the npc power ups, (that sysval(param2) only sends 1)
9,184,14,34,169,170,182,183,249,250,254,264,277,306,320,321,322,323,331 (Well actually it should be all the npc that die when touched by a player)

Posted: 14 Sep 2020, 1:58
by Victor ManuelMR
Spoiler
NESTED ERNEST wrote:This doesn't seem to work.

In your Scripting Help document you wrote in a table that npc's death event sends some player id to sysval (param2), but only sends the number 1.

Spoiler

For the npc power-ups, you can send to that sysval(param2): the player id(the number of the player who touched it, there can also be more than 2 if it was for a cheat like supermario8)

These are the npc power ups, (that sysval(param2) only sends 1)
9,184,14,34,169,170,182,183,249,250,254,264,277,306,320,321,322,323,331 (Well actually it should be all the npc that die when touched by a player)

If you can't send it to sysval(param2), you can send it to the target property of the npc.

You can find out that NPC was killed through Auto-Event: |NPC - Death| and activating this script:

Code: Select all

val(a) = npc(sysval(param1)).id

I don't know if I helped a lot.

Posted: 14 Sep 2020, 19:33
by NESTED ERNEST
It is not auto-event, is event object.

It is the value of sysval(param2) in the Deathevent(from event object(npc)), sysval(param2) doesn't work.