Stevertus / mcscript

A programming language for Minecraft Vanilla
https://mcscript.stevertus.com
MIT License
233 stars 16 forks source link

Support for Math Object #24

Closed acuba001 closed 3 years ago

acuba001 commented 4 years ago

Let me lead of with I have found mcscript very useful and fun to use. So, thank you for taking the time to make something like this.

Anyways, I know that Node should have a builtin Math object so I tried to use some trig functions in to make something more extravagant. It didn't seem to work in the mcscript for me so I was wondering if this could be added as an enhancement.

codinghusi commented 4 years ago

Isn't this a compile time feature? So if you compile the whole code the javascript will be executed, it will return the actual commands and then you won't have javascript code in minecraft. Therefore @acuba001's issue is legitimate.

acuba001 commented 4 years ago

Yes, that’s what I had in mind. Unfortunately, I think this repo hasn’t been worked on for a while. I’d guess it’s because of popular mods like World Edit. However, I feel like adding functionality from the Math object would open a lot of doors for creativity.

I’ve been pretty busy lately, but it’d be really cool if someone would add this feature to this or a fork of it.

codinghusi commented 4 years ago

I got a quick overview of the project an it's pretty easy to understand. But I couldn't figure out where the javascript is being executed.

Because I always wanted to develop my own language I started making my first scripting language for this same approach like mcscript. But because minecraft commands are very ugly it will be more similar to javascript without any mc commands. And also more syntax sugar :)

Stevertus commented 3 years ago

added in v0.2.3