Page 1 of 1
Access direction of the cursor stack
Posted: Tue Aug 30, 2016 12:32 am
by ridcully
Is there a way to get the current direction of the `cursor_stack`? I want get hold of the direction of the item the player holds in hand. The player has a method to turn the item, but it looks like the direction is not accessible via API? Am I wrong? TIA!
Re: Access direction of the cursor stack
Posted: Tue Aug 30, 2016 2:27 am
by Adil
Nope. Cursor stack doesn't have "direction" property in it, it hasn't any connection to the transparent green\red ghost that indicates the possibility of placement. The direction of entity you're building is connected to hardcoded mechanics of the item placement.
You can detect only the orientation of entity when it is built and the on_built_entity event is raised.
Re: Access direction of the cursor stack
Posted: Tue Aug 30, 2016 3:17 am
by aubergine18
You can also, from vague memory, programatically change rotation of an entity when placed - see the
Concrete Lamppost mod for example. (I could be completely wrong about this, just remember seeing something about rotation in that mod but haven't fully investigated what it does yet, or why).
Re: Access direction of the cursor stack
Posted: Mon May 08, 2017 9:08 pm
by ridcully
Is this information available in v15?
Re: Access direction of the cursor stack
Posted: Fri May 26, 2017 7:10 pm
by mickael9
Unfortunately, no.
See my request here:
viewtopic.php?f=28&t=45815