LuaMachine icon indicating copy to clipboard operation
LuaMachine copied to clipboard

Multiple states from different files?

Open markusstephanides opened this issue 4 years ago • 5 comments

Hi!

Thanks for the library!

In our use case we would need to be able to load multiple lua scripts which all use the same state class but not the same state. If I understood the code correctly, currently there is only one state per state class possible.

Is that correct or is there a way around it?

markusstephanides avatar Jul 09 '21 14:07 markusstephanides

Hi, this patch should do the trick: https://github.com/rdeioris/LuaMachine/pull/27

(will be merged soon)

rdeioris avatar Jul 09 '21 17:07 rdeioris

Thanks!

I ended up finding that PR and using it for my own fork to enable support for UE 4.27+ if you want to check it out :) https://github.com/markusstephanides/LuaMachine

markusstephanides avatar Jul 09 '21 17:07 markusstephanides

Hey, mate, sorry to bother you but did you get time to look at that PR or should we still fork to try to merge it ourselves ?

tfabretti avatar Jul 21 '23 15:07 tfabretti

@tfabretti dynamic states have been merged some week ago: https://github.com/rdeioris/LuaMachine/blob/master/Source/LuaMachine/Public/LuaBlueprintFunctionLibrary.h#L416

a bunch of features are still not exposed to blueprints, but eventually you should be able to use them in C++

rdeioris avatar Jul 21 '23 15:07 rdeioris

Oh, that's great ! I'm gonna take a look at that to understand how it works. Thank you <3

tfabretti avatar Jul 21 '23 15:07 tfabretti