This is the place for discussion and support for LunaLua and related modifications and libraries.
Moderator: Userbase Moderators
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
|
|
|
|
-
lotus006
- Spike

- Posts: 284
- Joined: Thu Sep 24, 2015 12:59 am
Postby lotus006 » Sat Feb 27, 2016 1:26 am
I'm not sure if we can but is there a way to remove a line created by the data:save() ? from a txt file ?
if yes how ?
Thanks
|
|
|
|
|
|
|
|
|
-
Destiny
- Volcano Lotus

- Posts: 572
- Joined: Tue Apr 22, 2014 2:40 pm
Postby Destiny » Sat Feb 27, 2016 6:46 pm
After a small period of time running LunaLua/SMBX 2.0, it just stops working with a message telling the memory couldn't be "read". I tried to get help with that before but Kevsoft just disappeared and forgot about it.
I use an older OS (Windows XP Service Pack 3) due to my PC being too weak for Win7/8/10.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Feb 27, 2016 6:52 pm
lotus006 wrote:I'm not sure if we can but is there a way to remove a line created by the data:save() ? from a txt file ?
if yes how ?
Thanks
You could just change the value to something that would never trigger anything in a function, so that it acts like it's gone. For example, if you are using 0 and 1 to represent false and true, you could change the value to 2 so that it doesn't satisfy any conditions.
|
|
|
|
|
|
|
|
|
-
lotus006
- Spike

- Posts: 284
- Joined: Thu Sep 24, 2015 12:59 am
Postby lotus006 » Sun Feb 28, 2016 12:18 am
PixelPest wrote:lotus006 wrote:I'm not sure if we can but is there a way to remove a line created by the data:save() ? from a txt file ?
if yes how ?
Thanks
You could just change the value to something that would never trigger anything in a function, so that it acts like it's gone. For example, if you are using 0 and 1 to represent false and true, you could change the value to 2 so that it doesn't satisfy any conditions.
Yep thanks I found a similar solution it's tricky but it's work and need more work :S
also instead of put a value else that we dont want we can put the variable empty at the end of the loop if we are in loop.
Code: Select all data:set("MyVariable01", tostring(""))
For Kevsoft, I dont know if is it possible but can you add to the Data(Class) something like this who can delete a value in the txt we dont want
ie: data:remove("MyVariable01")
Thanks
Edit: It's my or the command player:kill() is bugged in the last lunalua ? I got keep the player dying million time without ending 
weird. , I tried to get it on onInitAPI and onLoop but both is doing this 
|
|
|
|
|
|
|
|
|
-
TheSaturnyoshi
- Monty Mole

- Posts: 108
- Joined: Tue Dec 01, 2015 9:46 am
Postby TheSaturnyoshi » Sun Feb 28, 2016 8:25 am
That's because you're repeatedly killing the player, you can only do it once, try replacing it with this:
if playerKilled==0 then player:kill(); playerKilled=1; end
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sun Feb 28, 2016 1:42 pm
Can't seem to get this encrypted jumpcounter to work:
Code: Select all function onJumpEnd()
x = tonumber(Borderlands:get("jumpcounter"))
Borderlands:set("jumpcounter", x + 1)
Borderlands:save()
end
For the achievement "Up" as defined by Borderlands:set("up", 1), nothing happens although I don't get an error either:
Code: Select all function onLoop()
--achievements
if Borderlands:get("jumpcounter") == 1 then
if Borderlands:get("up") == 0 then
Borderlands:set("up", 1)
Borderlands:save()
playSFX(20)--boss-beat
end
end
end
EDIT: Fixed
Last edited by PixelPest on Mon Feb 29, 2016 4:58 pm, edited 1 time in total.
|
|
|
|
|
|
|
|
|
-
lotus006
- Spike

- Posts: 284
- Joined: Thu Sep 24, 2015 12:59 am
Postby lotus006 » Sun Feb 28, 2016 2:21 pm
as I know so far, you need to put tostring("1") or else is not saving the number instead, probably I'm wrong, correct me if is not wright :S
Code: Select all Borderlands:set("up", tostring"1") -- or tonumber("1")
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9887
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Sun Feb 28, 2016 2:37 pm
lotus006 wrote:as I know so far, you need to put tostring("1") or else is not saving the number instead, probably I'm wrong, correct me if is not wright :S
Code: Select all Borderlands:set("up", tostring"1") -- or tonumber("1")
He's using encrypt. With encrypt you can use numbers.
|
|
|
|
|
|
|
|
|
-
Mivixion
- Fuzzy

- Posts: 1052
- Joined: Sat Dec 20, 2014 2:44 pm
Postby Mivixion » Sun Feb 28, 2016 9:20 pm
Is there a way to make everything in game (including the player) fall at a consistent rate? The gravity in this game makes common kaizo tricks like shelljumps so hard to build.
Also interested in making jumping off of a P-switch freer as currently it is a pixel-perfect to jump off of.
Im also wondering if there's a way to get bombs to be spinjumpable in a way that you can bomb surf by spinjump chaining.
I'm just trying to think of ways to make kaizo levels more familiar.
Thanks in advance.
|
|
|
|
|
|
|
|
|
-
Nat The Porcupine
- Monty Mole

- Posts: 123
- Joined: Tue Nov 10, 2015 2:55 pm
Postby Nat The Porcupine » Tue Mar 01, 2016 10:00 pm
How do I use the 'Player:getCurrentPlayerSetting()' function and the PlayerSettings class to store the player's hitbox height, hitbox width, & hitbox duck height in their own variables? The documentation on this specific subject seems poor at best...
|
|
|
|
|
|
|
|
|
-
Kevsoft
- Ripper II

- Posts: 375
- Joined: Sun Jul 27, 2014 8:03 am
Postby Kevsoft » Wed Mar 02, 2016 6:30 am
PlayerSetting holds all informations about hitbox height, width, duck heiht and offsets of a character with a specific powerup state (i.e. Big Mario, Fireflower Link, ...). getCurrentPlayerSetting returns a "PlayerSetting"-Object which is bound to the current powerup state and character.
|
|
|
|
|
|
|
|
|
-
RudeGuy
- Bowser

- Posts: 4994
- Joined: Fri Dec 27, 2013 7:36 am
- Flair: local guy
Postby RudeGuy » Thu Mar 03, 2016 12:59 pm
I'm trying to use the paralx API with this code:
Code: Select all local paralX = loadAPI("paralX")
local bg1Img = Graphics.loadImage("bg1.png")
function onStart ()
bg1 = paralX.create ({image=bg1Img, x=-150, y=-150, repeatY=false, parallaxX=0.45, parallaxY=0.35, alpha=1})
end
But the parallax layer never appears. What am I doing wrong?
|
|
|
|
|
|
|
|
|
-
Hoeloe
- Phanto

- Posts: 1465
- Joined: Sat Oct 03, 2015 6:18 pm
- Flair: The Codehaus Girl
- Pronouns: she/her
Postby Hoeloe » Thu Mar 03, 2016 5:18 pm
RudeGuy07 wrote:I'm trying to use the paralx API with this code:
Code: Select all local paralX = loadAPI("paralX")
local bg1Img = Graphics.loadImage("bg1.png")
function onStart ()
bg1 = paralX.create ({image=bg1Img, x=-150, y=-150, repeatY=false, parallaxX=0.45, parallaxY=0.35, alpha=1})
end
But the parallax layer never appears. What am I doing wrong?
It's probably waaaay off screen. You're telling it not to repeat on the Y axis, and positioning it at -150 on the Y axis. Remember that the top left corner of section 1 is at -200000,-200000.
|
|
|
|
|
|
|
|
|
-
HenryRichard
- Reznor

- Posts: 2843
- Joined: Mon Dec 23, 2013 12:09 pm
- Flair: Is this where I type my password?
-
Contact:
Postby HenryRichard » Thu Mar 03, 2016 10:51 pm
Is there a way to read .ini files? It would be pretty rad if there was.
(not the player.ini files, like one I made myself)
|
|
|
|
|
|
|
|
|
-
lotus006
- Spike

- Posts: 284
- Joined: Thu Sep 24, 2015 12:59 am
Postby lotus006 » Fri Mar 04, 2016 12:30 am
I need to find some P2 value in memory address offsets but I have for the P1 like player:mem(0xF0, FIELD_WORD, 4)
but in example in cheat engine how do I view this memory section 0xF0 ?
Last edited by lotus006 on Fri Mar 04, 2016 4:20 am, edited 1 time in total.
|
|
|
|
|
|
|
|
|
-
Kevsoft
- Ripper II

- Posts: 375
- Joined: Sun Jul 27, 2014 8:03 am
Postby Kevsoft » Fri Mar 04, 2016 1:25 am
HenryRichard wrote:Is there a way to read .ini files? It would be pretty rad if there was.
(not the player.ini files, like one I made myself)
You can look into the io-library from the standard lua libraries.
|
|
|
|
|
|
|
|
|
-
Circle Guy
- Rocky Wrench

- Posts: 645
- Joined: Mon Jan 04, 2016 9:25 pm
Postby Circle Guy » Sun Mar 06, 2016 4:51 am
How do you create a lunadll.lua file? (The one for your episode)
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 1 guest
|