Change entity's force
Change entity's force
Is there a method or something else I can do to change the force a entity belongs to?
			
			
									
									
						Re: Change entity's force
No, the force is only readonly atm.
			
			
									
									
						Re: Change entity's force
Thanks for the info.
Then see this as a suggestion for future updates
			
			
									
									
						Then see this as a suggestion for future updates

Re: Change entity's force
destroy and create it back
			
			
									
									
						Re: Change entity's force
Exactly this is the problem.
It seems like that the entities which you spawn with create() belong to the neutral-force.
At first I thought that this is not a big problem, because you are able to interact with them.
But then I spawned a Lab next to some turrets that I built regularly. And the lab was destroyed instantly by the turrets.
			
			
									
									
						It seems like that the entities which you spawn with create() belong to the neutral-force.
At first I thought that this is not a big problem, because you are able to interact with them.
But then I spawned a Lab next to some turrets that I built regularly. And the lab was destroyed instantly by the turrets.
Re: Change entity's force
You need to specify the field "force" in the table you used to create the entity
			
			
									
									
						Re: Change entity's force
Not sure if I undestand..
Can you give me an example, please?
			
			
									
									
						Can you give me an example, please?
Re: Change entity's force
Code: Select all
game.createentity{name="electric-turret", position={x=0, y=0}, force="enemy"} Re: Change entity's force
You can't specify the force at the moment either  It is in our issue list now.
 It is in our issue list now.
			
			
									
									
						 It is in our issue list now.
 It is in our issue list now.Re: Change entity's force
Will it be available for 0.3? 
Edit: yay im the first filter inserter
			
			
									
									
						
Edit: yay im the first filter inserter

Re: Change entity's force
Yes it will.ficolas wrote:Will it be available for 0.3?


