How do you put enemies in Clear Pipes?

General discussion about Super Mario Bros. X.
Rendangbike
Shy Guy
Shy Guy
Posts: 6
Joined: Sat Oct 30, 2021 3:57 am
Pronouns: he/him

How do you put enemies in Clear Pipes?

Postby Rendangbike » Fri Nov 05, 2021 10:11 am

How do you put enemies in Clear Pipes like in SM3DW?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: How do you put enemies in Clear Pipes?

Postby Enjl » Fri Nov 05, 2021 11:04 am

You can't natively place them in such a way that they spawn in them.
I have however written some code for my MAGLX3 level which lets you do that.
https://drive.google.com/file/d/1FQLmUH ... sp=sharing

MAKING ENEMY TYPES ABLE TO ENTER CLEAR PIPES
In the file luna.lua, near the top, are some lines that are as follows:
local clearpipe = require("blocks/ai/clearpipe")
clearpipe.registerNPC(285)
clearpipe.registerNPC(207)

These allow NPCs of the given ID to enter clear pipes. In the code linked, the require was slightly outdated, but the lines I pasted above should work for spinies and sparkies respectively.

PLACING ENEMIES IN CLEAR PIPES
The level folder also contains a set of files pertaining to npc-751 (a custom range npc). This is an npc that I've made to spawn an NPC in a clear pipe. The code needs a single adjustment in line 5: Changing "blocks/clearpipe" to "blocks/ai/clearpipe".
Then, in the editor, you can place the npc-751 npc and change the container npc to the NPC you want spawned in the clear pipe.

This particular NPC generates an NPC of the type whenever the timer passes a certain value, and probably also needs pnpc removed, but it should work in the broad strokes.


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest