SMBX - Hammer Starman (Repost)

General discussion about Super Mario Bros. X.
User avatar
DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

SMBX - Hammer Starman (Repost)

Postby DarkShadeX » Fri May 22, 2015 4:05 pm

I got a lot of emails about if i could repost the Starman code from a while ago,if you guys really want it,then here:

Code: Select all

--Set some Variables first:
local StarPower_P1 = false
 local StarTimer_P1 = 0


 -- Find Starman:
function countNPCID(id)
   local npcs = findnpcs(id, -1)
   local count = 0
   for k,v in pairs(npcs) do
      count = count + 1
   end
   return count
end

function onLoop()

 local HNPC = findnpcs(171, -1) -- The Hammer in section!
 
 hud(false)
 printText("GOT STARPOWER: "..tostring(StarPower_P1), 30, 50)
 printText("STARMAN NPC IN ROOM: "..tostring(count), 30, 70)
 printText("INVINCIBILITY LEFT: "..tostring(StarTimer_P1), 30, 90)
 -- Get Star Power:
 
 if(StarPower_P1 == false and countNPCID(103) == 0 and count ~= -1 )then
   count = -1
   StarTimer_P1 = 600
  end
  
 -- Check Stuff:
if(StarTimer_P1 >= 1)then
  StarPower_P1 = true -- Keep Power state to true.
  mem(0x00B2C8C0, FIELD_WORD, 0xFFFF) -- Make the Player Invincible.
 else
  StarPower_P1 = false -- Keep Power state to false.
  mem(0x00B2C8C0, FIELD_WORD, 0) -- Make the Player NOT Invincible.
  HNPC[0].x = -1000000 HNPC[0].y = -1000000 -- Reset Hammer Position!
 end

 -- If you're in Invincibility State: 
if(StarPower_P1 == true and StarTimer_P1 >= 1)then -- Reduce Invincibility Time!
 StarTimer_P1 = StarTimer_P1 - 1
 HNPC[0].x = player.x HNPC[0].y = player.y -- Set Hammer position to player.
 end
 
end
Make sure to tweak the code to make it work better.

User avatar
Radishl
Banned
Posts: 1006
Joined: Fri Apr 18, 2014 6:17 pm
Current Project: Super Mario Hero

Re: SMBX - Hammer Starman (Repost)

Postby Radishl » Mon May 25, 2015 9:36 pm

Wow, neat!
We could really use this.

Thanks Dark!
Image

User avatar
Mosaic
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
Joined: Fri Feb 27, 2015 8:07 pm
Flair: All has a reason behind it, even if it's tough.
Current Project: The Mosaic Group's Journey, Toad's SMB Adventure, Mosaic Adventures and Other Secret Projects?
Chat Username: Mosaic
Contact:

Re: SMBX - Hammer Starman (Repost)

Postby Mosaic » Tue Jul 21, 2015 11:40 pm

How do you use this?

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
And Here's The Proof
My Rainbow Of Levels
Mosaic's Museum(My Discord)

Image

Image

Danny wrote:Here's some constructive criticism: What the hell.
Witchking wrote:Approved!

Discord Quotes: show
Image


SMBXxer
Grinder
Grinder
Posts: 1033
Joined: Fri Dec 20, 2013 4:33 pm

Re: SMBX - Hammer Starman (Repost)

Postby SMBXxer » Sat Jul 25, 2015 2:58 pm

What object does it replace? I use this in Lunaglobal, right?
Might be working on an episode maybe.



<Joey> you want a dickpic
<Quill> "Let it go." Anna says as Elsa cums

User avatar
FanofSMBX
Bowser
Bowser
Posts: 3882
Joined: Sun Dec 22, 2013 12:01 pm

Re: SMBX - Hammer Starman (Repost)

Postby FanofSMBX » Sun Jul 26, 2015 4:09 am

SuperMario12345 wrote:How do you use this?
I think you put the code in your level's lunadll.lua and then you collect a Red Coin.

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!


SMBXxer
Grinder
Grinder
Posts: 1033
Joined: Fri Dec 20, 2013 4:33 pm

Re: SMBX - Hammer Starman (Repost)

Postby SMBXxer » Sun Jul 26, 2015 11:17 pm

FanofSMBX wrote:
SuperMario12345 wrote:How do you use this?
I think you put the code in your level's lunadll.lua and then you collect a Red Coin.
.lua?
I still have .dll, do I need to change?
Might be working on an episode maybe.



<Joey> you want a dickpic
<Quill> "Let it go." Anna says as Elsa cums

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1779
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: SMBX - Hammer Starman (Repost)

Postby Wohlstand » Sun Aug 09, 2015 5:46 pm

SMBXxer wrote:
FanofSMBX wrote:
SuperMario12345 wrote:How do you use this?
I think you put the code in your level's lunadll.lua and then you collect a Red Coin.
.lua?
I still have .dll, do I need to change?
LunaLUA is same LunaDLL but in new view, and with a lot of new better things (Lua-scripting sub-system, Better Audio engine, Improvment of Graphic system with OpenGL usage, Some bug-fixes, etc. Don't worry, it still support old lunadll.txt, but this sub-system no more have updates, most of new things are available for lunadll.lua)
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers


Return to “General”

Who is online

Users browsing this forum: Sancles-Chan, ShadowStarX and 8 guests