Log In  

Reading the user manual, I see there are states for actors (in 10.3.1: Common Actor Events).
Is it possible to access those states in lua, like a bool or a function?
Thank You

P#60765 2019-01-12 10:11 ( Edited 2019-01-12 10:13)

:: zep

Not currently (this is planned for 0.3.6).

A slightly messy work-around in the meantime is to create a modifier (under the New Item menu), use the desired state as the trigger, and with a length (duration) of 1. So the modifier will be active only when that state is true, frame by frame.

You can then check the state of that modifier from inside a script:

function draw()
    if this:is_active("is_standing") then
        local x,y,z = this:get_xyz()
P#60767 2019-01-12 10:55 ( Edited 2019-01-12 11:01)

That did it, thank you!

P#60768 2019-01-12 11:03 ( Edited 2019-01-12 11:59)

Fun little bit :)

P#60777 2019-01-12 22:10

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-08-23 14:48 | 0.012s | 2097k | Q:16