Skip to content

Commit

Permalink
iforgor
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Nov 9, 2024
1 parent 3881910 commit a214b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<define name="no-deprecation-warnings" />

<app title="Leather Engine" file="LeatherEngine" packageName="com.leather128.funkin"
package="com.leather128.funkin" main="Main" version="0.5.0" company="leather128" />
package="com.leather128.funkin" main="Main" version="0.5.0pre" company="leather128" />

<!-- totally not stolen from psych engine -->
<haxedef name="LINC_LUA_RELATIVE_DYNAMIC_LIB" /> <!-- i think this is important -->
Expand Down

5 comments on commit a214b7e

@Refenger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where runHaxeCode func i need it so bad rn

@Vortex2Oblivion
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never use hscript like a normal person

@Refenger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea i just noticed it has hscript now but i have no idea how to use it. looking at the source code i can see that i can put .hx classes in some folders and they will run but how does that work and what would i need to write for something like scroll seed increase on player note hit for example?

@Vortex2Oblivion
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put any hscript file(.hx) in any folder that you can put lua in
data/scripts/local, data/scripts/global etc but you can also put it in the classes folder to modify other states and write your own too.
All the functions from lua can be called in hscript so if for example you wanted to, like you said increase scroll speed after a note is hit you could do so like

function playerOneSing(){
     PlayState.instance.speed += 0.05;
}

@Refenger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats sick, thanks

Please sign in to comment.