Here's the NPC's tags:
Code: Select all
{key=bellossom1, name=Bellossom, routine=scene_1}
Code: Select all
{key=bellossom1, name=Bellossom, routine=scene_1}
http://engine.wohlnet.ru/pgewiki/Fade.lua7NameSam wrote:I'm sorry, but I'm unfamiliar with Fader Libraries, and google doesn't give me any good results.Wohlstand wrote:For this case you don't need for PNG BGO's, you can apply fader library and set black screen with half alpha-channel. However you still can make some foreground BGO with semitransparency and save it into PNG format (LunaLUA-SMBX supports mask-less true-transparency PNG images)7NameSam wrote:How do you use a PNG? I want to use one to make the screen darker in a section.
Thanks for the help! I got things working.Rednaxela wrote:More stuffDuker wrote:Stuff
Code: Select all
local Testavator
local IsTouched = false
function onLoad()
Testavator = Block.get(137)[1]
end
function onLoop()
if(Testavator:collidesWith(player) == 1) then
if(not IsTouched) then
IsTouched = true
if(CurrentMove == "right") then
CurrentMove = "up1"
elseif(CurrentMove == "up1") then
CurrentMove = "left"
elseif(CurrentMove == "left") then
CurrentMove = "up2"
elseif(CurrentMove == "up2") then
CurrentMove = "right"
end
end
if(CurrentMove == "right") then
Testavator.x = Testavator.x+2
player.x = player.x+2
elseif(CurrentMove == "up1" or CurrentMove == "up2") then
Testavator.y = Testavator.y-2
player.y = player.y-2
elseif(CurrentMove == "left") then
Testavator.x = Testavator.x-2
player.x = player.x-2
end
elseif(Testavator:collidesWith(player) == 0) then
IsTouched = false
end
end
Code: Select all
local tTestavator = NPC.get(105, -1)[1]
if(tTestavator.ai1 == 1) then
tTestavator.speedY = -0.065 --Should ideally be 0 but then the platform slowly loses altitude for whatever reason
if(not IsTouched) then
IsTouched = true
if(CurrentMove == "right") then
CurrentMove = "up1"
elseif(CurrentMove == "up1") then
CurrentMove = "left"
elseif(CurrentMove == "left") then
CurrentMove = "up2"
elseif(CurrentMove == "up2") then
CurrentMove = "right"
end
end
if(CurrentMove == "right") then
tTestavator.speedX = 1.5
elseif(CurrentMove == "up1" or CurrentMove == "up2") then
tTestavator.speedY = -1.5
elseif(CurrentMove == "left") then
tTestavator.speedX = -1.5
end
elseif(tTestavator.ai1 == 0) then
IsTouched = false
tTestavator.speedX = 0
end
Code: Select all
[string "mainV2.lua"]:140: attempt to call upvalue 'nativeIsSamePath' (a nil value)
This is an error caused by mainv2.lua being newer than lunadll.dll. You need to download the latest version of lunadll from the Github.S1eth wrote:I was trying to test a level using the particles.lua API (in the editor, smbx 2.0 beta) and got this error message (handled in pcall --> "could not open particle descriptor file"). After a few tests, I saw that using io.open always causes this error for me.
What causes this and how do I avoid it?Code: Select all
[string "mainV2.lua"]:140: attempt to call upvalue 'nativeIsSamePath' (a nil value)
Actually you can do this fairly simply without Lua by placing a quicksand tile over a solid block.ShadowStarX wrote: 2) Glued floor
Basically, if Mario is on the floor, he can only jump, but he cannot move by walking or running.
WestonSmith wrote:(1) For particles, its super easy to make effects follow a whole screen, but how do I place something in a particular x/y location? Example, setting a small_fire effect on a tile right above a background object to mimic a torch?
(2) I've seen a raocoin tracker in pyro's videos (i.e. a silhouette appears after you grab a raocoin), but I have no idea how to get it working. Furthermore, I can't find the folder with the silhouette graphic in it (which I'd like the ability to modify).
Code: Select all
function onNPCKill(eventObj,killedNPC,killReason)
if killedNPC == 1 then
Level.exit()
end
end
The "killedNPC" variable is an NPC object, not the ID of the NPC. You need to check the NPCs ID.7NameSam wrote:Help, I can't get the onKillNPC function to work, specifically when calling for a specific npc killed?I'm using smbx 2.0 in the gif, and killReason works, So I'm not sure what I'm doing wrong.Code: Select all
function onNPCKill(eventObj,killedNPC,killReason) if killedNPC == 1 then Level.exit() end end
You know you don't need to manually create a hitbox for the player. You can just use the player in place of a collider and the library will do that automatically. The same is true of NPCs. Line 86 can just be:__a wrote:EXAMPLE CODE of 'pnpc.lua':
I believe it works perfectly. Not sure if the code is perfect, though.
This may help new users of lunalua to understand 'pnpc.lua'.
(see attachment)
Code: Select all
if(colliders.collide(player, v)) then
pingRednaxela wrote:Ahhh right. Sorry about that. Life has been a bit hectic recently and that item slipped off my radar for a bit.SAJewers wrote:any updates on the ticking P-switch thingy?
Once I get time for it, it's probably a quick 1-evening type of task.
Any target date of when you want it for? I know things are in the level review stage right now right? I'll try to not let it slip off my radar in any case.