Bug with "if .Ysp = 0 then" statement (NPCs)
Posted: 3 Nov 2016, 1:47
The game won't be able to execute statements like "if .Ysp = 0 then" if something is modifying the velocity of the NPC in the code. When it isn't, the statement will execute properly, which is weird because with the horizontal speed this does not happens, that's why I think it's a bug.
For example, let's apply this code to the mushroom (NPC-10) (without parallel execution)
This code will work and the message will display in every frame, but if we apply this code:
It won't work. but, as I said before this will work correctly with horizontal speed. For example:
I'm not completely sure if this is a bug or it's still my error. I'd like to make a bouncing mushroom but I can't get it work. In any case hope 5438A38A give a look at this. :)
For example, let's apply this code to the mushroom (NPC-10) (without parallel execution)
Code: Select all
with NPC(sysval(param1))
If .Ysp = 0 then
call showmsg("test")
end if
end withThis code will work and the message will display in every frame, but if we apply this code:
Code: Select all
with NPC(sysval(param1))
.Ysp = .Ysp + 0.26
If .Ysp = 0 then
call showmsg("test")
end if
end with
It won't work. but, as I said before this will work correctly with horizontal speed. For example:
Code: Select all
with NPC(sysval(param1))
.Xsp = .Xsp + 0.26
If .Xsp = 0 then
call showmsg("test")
end if
end with
I'm not completely sure if this is a bug or it's still my error. I'd like to make a bouncing mushroom but I can't get it work. In any case hope 5438A38A give a look at this. :)