Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to make custom stage? #15616

Closed
DavesTheBone opened this issue Oct 1, 2024 · 6 comments
Closed

how to make custom stage? #15616

DavesTheBone opened this issue Oct 1, 2024 · 6 comments
Labels
question Further information is requested

Comments

@DavesTheBone
Copy link

What is your question?

The image itself is ready.
It says to put lua and json in my-mods/stages, but what code do I need to write?
I'm using the Downloaded Build

@DavesTheBone DavesTheBone added the question Further information is requested label Oct 1, 2024
@DavesTheBone DavesTheBone changed the title how to make stage? how to make custom stage? Oct 1, 2024
@baobab121
Copy link

baobab121 commented Oct 2, 2024

just use lua script api for .lua file and take the dad stage json file (assets/shared/stages/stage.json) and just edit it as you need. also name the .lua and .json files the same (yourstage.json, yourstage.lua)

@SantiagoCalebe
Copy link

Use LuaScript API

or

LUA

function onCreate()
	makeLuaSprite('Asset Name', 'File Name', −700, −150); 
	setScrollFactor('Asset Name', 1, 1); 
	scaleObject('Asset Name', 1, 1); 

	addLuaSprite('Asset Name', false); 
	close(true);
end

JSON

{
	"directory": "",
	"defaultZoom": 1,
	"stageUI": "",

	"boyfriend": [1150, 250],
	"girlfriend": [40, 10],
	"opponent": [200, 250],
	"hide_girlfriend": false,
}

@DavesTheBone
Copy link
Author

DavesTheBone commented Oct 3, 2024

Use LuaScript API

or

LUA

function onCreate()
	makeLuaSprite('Asset Name', 'File Name', −700, −150); 
	setScrollFactor('Asset Name', 1, 1); 
	scaleObject('Asset Name', 1, 1); 

	addLuaSprite('Asset Name', false); 
	close(true);
end

JSON

{
	"directory": "",
	"defaultZoom": 1,
	"stageUI": "",

	"boyfriend": [1150, 250],
	"girlfriend": [40, 10],
	"opponent": [200, 250],
	"hide_girlfriend": false,
}

YOOOO THX BRO
I'm sorry, I forgot, but could you teach me how to make background animations?

@DavesTheBone DavesTheBone reopened this Oct 3, 2024
@baobab121
Copy link

if you have spritesheet and .xml file then

function onCreate() 	
        makeAnimatedLuaSprite('Asset Name', 'File Name', −700, −150);
        addAnimationByPrefix('Asset Name', 'Animation Name', 'Animation Prefix in .xml file', 24, true)
        setScrollFactor('Asset Name', 1, 1); 
        scaleObject('Asset Name', 1, 1); 	

        addLuaSprite('Asset Name', false); 	
        close(true); 
end 

@SantiagoCalebe
Copy link

if you have spritesheet and .xml file then

function onCreate() 	
        makeAnimatedLuaSprite('Asset Name', 'File Name', −700, −150);
        addAnimationByPrefix('Asset Name', 'Animation Name', 'Animation Prefix in .xml file', 24, true)
        setScrollFactor('Asset Name', 1, 1); 
        scaleObject('Asset Name', 1, 1); 	

        addLuaSprite('Asset Name', false); 	
        close(true); 
end 

Is this, you use XML and Spritesheet generator and give the name of BG, in the asset name, you put 'BG' and in the file name, your file name, and in the animation name, put the animation name, use bg. @baobab121

@SantiagoCalebe
Copy link

Use LuaScript API
or
LUA

function onCreate()
	makeLuaSprite('Asset Name', 'File Name', −700, −150); 
	setScrollFactor('Asset Name', 1, 1); 
	scaleObject('Asset Name', 1, 1); 

	addLuaSprite('Asset Name', false); 
	close(true);
end

JSON

{
	"directory": "",
	"defaultZoom": 1,
	"stageUI": "",

	"boyfriend": [1150, 250],
	"girlfriend": [40, 10],
	"opponent": [200, 250],
	"hide_girlfriend": false,
}

YOOOO THX BRO I'm sorry, I forgot, but could you teach me how to make background animations?

You are welcome <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants