Page 1 of 1

SimpleEntityWithDirection

Posted: Tue Jun 25, 2019 10:19 pm
by DaveMcW
I love SimpleEntityWithForce, it is my first choice whenever I want to add a new entity. But SimpleEntityWithForce does not work well with entities that are not square, or entities that have different rotations.

I propose a new entity prototype, SimpleEntityWithDirection. It is intended to be used for player buildings, so it includes most of the functionality of SimpleEntityWithForce.

SimpleEntityWithDirection

Supported LuaEntity properties:
direction
force

Basics
Extends Prototype/EntityWithHealth. Will be targeted by units/turrets.

Optional prototype properties:

animation
Type: Types/Animation4Way
Must have one of 'pictures' or 'animations' defined.

pictures
Type: Types/Sprite4Way
Must have one of 'pictures' or 'animations' defined.

force_visibility
Type: Types/ForceCondition

random_animation_offset
Type: Types/bool

render_layer
Type: Types/RenderLayer

Re: SimpleEntityWithDirection

Posted: Wed Jun 26, 2019 6:33 am
by posila
If someone is going to implement this, I think it shouldn't be new entity type but rather just adding support for direction on SimpleEntityWithForce and SimpleEntityWithOwner (not SimpleEntity though, keep that one simple for real)

Re: SimpleEntityWithDirection

Posted: Wed Oct 25, 2023 8:26 am
by Bilka
4-way-direction support was added to SimpleEntityWithOwner (and by extension also SimpleEntityWithForce) in 1.1.0. However, it does not support Animation4Way. For that there is a new request here: 109313