How Do I Make Enemies Stomp???

Need help with any SMBX game-related issues? Ask your questions here.
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?
User avatar
TheTojoz
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Apr 09, 2017 4:24 pm
Chat Username: TheTojoz

How Do I Make Enemies Stomp???

Postby TheTojoz » Sun Apr 09, 2017 4:37 pm

I'm Working On A Roy Koopaling Boss Battle OnSmbx 1.4. And I Want Him To Have A Stomping Power When He Hits The Ground. So Could You Help Me? :|
Last edited by TheTojoz on Sun Apr 09, 2017 4:45 pm, edited 1 time in total.
-TheTojoz.

User avatar
NightKawata
Mega Mole
Mega Mole
Posts: 285
Joined: Wed Jul 30, 2014 12:33 am
Current Project: Metanet Hunter -1
Chat Username: NightKawata
Contact:

Re: How Do I Make Enemies Stomp???

Postby NightKawata » Sun Apr 09, 2017 4:38 pm

easy just replace the smb3 bowser with your graphic of choosing

boom instant stomping monster

no seriously though 1.4? yikes
Go play Metanet Hunter CD: http://store.steampowered.com/app/586570/
Go look at Metanet Hunter CD: viewtopic.php?f=51&t=15229

Image

Code: Select all

>mario isn't canon, when you die he faces the screen

User avatar
Electriking
Posts: 4382
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Current Project: Something
Chat Username: ElectriKing
Contact:

Re: How Do I Make Enemies Stomp???

Postby Electriking » Sun Apr 09, 2017 7:06 pm

NightKawata wrote:easy just replace the smb3 bowser with your graphic of choosing

boom instant stomping monster

no seriously though 1.4? yikes
I think he means how to get the ground to shake when Roy stomps. If that is the case, I don't know if that is possible.
SMM2 ID: JJF-P7G-FSF

User avatar
NightKawata
Mega Mole
Mega Mole
Posts: 285
Joined: Wed Jul 30, 2014 12:33 am
Current Project: Metanet Hunter -1
Chat Username: NightKawata
Contact:

Re: How Do I Make Enemies Stomp???

Postby NightKawata » Sun Apr 09, 2017 7:56 pm

King of Eterity wrote:
NightKawata wrote:easy just replace the smb3 bowser with your graphic of choosing

boom instant stomping monster

no seriously though 1.4? yikes
I think he means how to get the ground to shake when Roy stomps. If that is the case, I don't know if that is possible.
i think once roy went onto a diet, that stopped happening

good on him
Go play Metanet Hunter CD: http://store.steampowered.com/app/586570/
Go look at Metanet Hunter CD: viewtopic.php?f=51&t=15229

Image

Code: Select all

>mario isn't canon, when you die he faces the screen

User avatar
Koopsakimoto
Fighter Fly
Fighter Fly
Posts: 68
Joined: Wed Jul 20, 2016 3:50 pm
Current Project: Mario Classic 2. (1.4.4)
Contact:

Re: How Do I Make Enemies Stomp???

Postby Koopsakimoto » Sun Apr 09, 2017 9:27 pm

Lx xzit made some scripts for the SMB3 Koopalings
I support
Spoiler: show
ImageImage

ImageImage
Spoiler: show
ImageImage
One thing you should about me,I constatly Create SMBX episodes.

User avatar
Bowser 1000
Koopa Troopa
Koopa Troopa
Posts: 26
Joined: Mon Apr 10, 2017 8:18 am

Re: How Do I Make Enemies Stomp???

Postby Bowser 1000 » Mon Apr 10, 2017 8:21 am

i do not think it is possible! but it would be very cool
"Bwa ha ha ha! You've stepped right into my trap, just like I knew you would! I warn you, friend, watch your step! *kills mario* no star for you!

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: How Do I Make Enemies Stomp???

Postby PixelPest » Mon Apr 10, 2017 8:25 am

It's like one or two lines of code in 2.0 but I have no idea how you would do it in 1.4

User avatar
Electriking
Posts: 4382
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Current Project: Something
Chat Username: ElectriKing
Contact:

Re: How Do I Make Enemies Stomp???

Postby Electriking » Thu May 04, 2017 12:38 pm

PixelPest wrote:It's like one or two lines of code in 2.0 but I have no idea how you would do it in 1.4
Sorry for the bump but I think I need to know these lines of code for my Morton Koopa Jr Boss.
SMM2 ID: JJF-P7G-FSF

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: How Do I Make Enemies Stomp???

Postby PixelPest » Thu May 04, 2017 8:35 pm

Look at using defines: http://wohlsoft.ru/pgewiki/SMBX_Fields

Specifically try Defines.earthquake

User avatar
Electriking
Posts: 4382
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Current Project: Something
Chat Username: ElectriKing
Contact:

Re: How Do I Make Enemies Stomp???

Postby Electriking » Fri May 05, 2017 4:03 pm

PixelPest wrote:Look at using defines: http://wohlsoft.ru/pgewiki/SMBX_Fields

Specifically try Defines.earthquake
So how do I get it to work with NPCs landing (like NPC-267)
SMM2 ID: JJF-P7G-FSF

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: How Do I Make Enemies Stomp???

Postby PixelPest » Fri May 05, 2017 10:19 pm

Try something like this:

Code: Select all

local pnpc = API.load("pnpc"); --load the pnpc library

function onTick() --event run every tick (a measure of time)
   for _, v in pairs(NPC.get(267)) do --iterate over all Larry Koopas
      local larry = pnpc.wrap(v); --give each NPC its own wrapper

      if larry.data.downward == nil then --if there is no data named "downward" in the NPCs data table
         larry.data.downward = false; --set it to false
      end

      if v.speedX > 0 then --if the NPC is moving down
         larry.data.downward = true; --set the data table variable "downward" to true
      end
      
      if (larry.data.downward) and (v.collidesBlockBottom) then --if the data table variable "downward" is true and the NPC is colliding with a block from the bottom
         Defines.earthquake = 6; --set an earthquake factor of 6 (you can definitely change this)
         larry.data.downward = false; --since the NPC is obviously no longer moving down this can be set to false
      end
   end
end 
Hit "Select All" and copy it to a lunadll.lua file. Haven't tested it since I'm on my phone but it should work

User avatar
loop13
Eerie
Eerie
Posts: 976
Joined: Sun Apr 17, 2016 5:56 pm
Flair: I mainly play Celeste nowadays
Current Project: failing English IV
Chat Username: loop13uh

Re: How Do I Make Enemies Stomp???

Postby loop13 » Sat May 06, 2017 2:45 am

He said SMBX 1.4.
Hello, I make a lot of typos
specific people know my whereabouts though

my wifi is as useful as a brick

im more active on discord

:idea: I'm not (completely) dead; I rarely talk because I usually have nothin to say; I'll talk when I actually have a comment I want to make, or if someone asks me somethin...

nostalgia is a beautiful thing, isn't it?

anything before 2020 is most likely me being a weirdo or an idiot.

User avatar
Electriking
Posts: 4382
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Current Project: Something
Chat Username: ElectriKing
Contact:

Re: How Do I Make Enemies Stomp???

Postby Electriking » Sat May 06, 2017 6:42 am

Jayce 777 wrote:He said SMBX 1.4.
But I need this for my levels in 2.0
PixelPest wrote:Try something like this:

Code: Select all

local pnpc = API.load("pnpc"); --load the pnpc library

function onTick() --event run every tick (a measure of time)
   for _, v in pairs(NPC.get(267)) do --iterate over all Larry Koopas
      local larry = pnpc.wrap(v); --give each NPC its own wrapper

      if larry.data.downward == nil then --if there is no data named "downward" in the NPCs data table
         larry.data.downward = false; --set it to false
      end

      if v.speedX > 0 then --if the NPC is moving down
         larry.data.downward = true; --set the data table variable "downward" to true
      end
      
      if (larry.data.downward) and (v.collidesBlockBottom) then --if the data table variable "downward" is true and the NPC is colliding with a block from the bottom
         Defines.earthquake = 6; --set an earthquake factor of 6 (you can definitely change this)
         larry.data.downward = false; --since the NPC is obviously no longer moving down this can be set to false
      end
   end
end 
Hit "Select All" and copy it to a lunadll.lua file. Haven't tested it since I'm on my phone but it should work
Would Defines.player_runspeed = 0 and Defines.player_walkspeed=0 Prevent the player from moving when the Eathquake happens and how do I do this when it happens and when the player is on the floor when it happens?
Last edited by Electriking on Sat May 06, 2017 7:58 am, edited 1 time in total.
SMM2 ID: JJF-P7G-FSF

User avatar
Hoeloe
Grinder
Grinder
Posts: 1103
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: How Do I Make Enemies Stomp???

Postby Hoeloe » Sat May 06, 2017 7:57 am

PixelPest wrote:v.speedX > 0
May want to double check that...

User avatar
The0x539
Nipper Plant
Nipper Plant
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm
Current Project: SMBX2

Re: How Do I Make Enemies Stomp???

Postby The0x539 » Sat May 06, 2017 10:08 am

King of Eterity wrote:Would Defines.player_runspeed = 0 and Defines.player_walkspeed=0 Prevent the player from moving when the Eathquake happens and how do I do this when it happens and when the player is on the floor when it happens?

Code: Select all

local pnpc = API.load("pnpc") --load the pnpc library
local inputs2 = API.load("inputs2") --load the inputs2 library
local stun = 0 --initialize a variable for the stun timer, local to this file, and start with it at 0

function onTick() --event run every tick (a measure of time)
	for _, v in pairs(NPC.get(267)) do --iterate over all Larry Koopas
		local larry = pnpc.wrap(v) --give each NPC its own wrapper
	
		if larry.data.downward == nil then --if there is no data named "downward" in the NPCs data table
			larry.data.downward = false --set it to false
		end
	
		if v.speedY > 0 then --if the NPC is moving down
			larry.data.downward = true --set the data table variable "downward" to true
		end
	
		if (larry.data.downward) and (v.collidesBlockBottom) then --if the data table variable "downward" is true and the NPC is colliding with a block from the bottom
			Defines.earthquake = 8 --set an earthquake factor of 8 (you can definitely change this)
			larry.data.downward = false --since the NPC is obviously no longer moving down this can be set to false
			if player:isGroundTouching() then --if the player is touching the ground
				stun = 30 --set the stun timer to 30 ticks, this is ~0.5 seconds (you can definitely change this)
				player.speedX = 0 --stop the player in their tracks
			end
		end
		
		if stun > 0 then --if the stun timer is still going 
			stun = stun - 1 --tick the stun timer down by 1
			inputs2.locked[1].all = true --use inputs2 to lock all of player 1's inputs
		else --otherwise (if the stun timer ISN'T still going)
			inputs2.locked[1].all = false --use inputs2 to unlock all of player 1's inputs
		end
	end
end 

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: How Do I Make Enemies Stomp???

Postby PixelPest » Sat May 06, 2017 10:16 am

Hoeloe wrote:
PixelPest wrote:v.speedX > 0
May want to double check that...
Yeah...oops


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 3 guests