Hello, i did use the search button, but with no results...
I would like to make a simple mod making the player able to build at twice the range he can right now. I have found its somehow related to onbuiltentity, but i dont really have enough experience to make it work...
Can somebody point me in the right direction please?
Game player build range
- Lukasecicek
- Inserter
- Posts: 26
- Joined: Mon Mar 11, 2013 9:42 am
- Contact:
Re: Game player build range
If the building range isn't defined on the player-definition, which I believe isn't otherwise you probably wouldn't ask
you have to use a workaround.
What I could imagine is using the OnPut-event, which doesn't depend on the building-range.
So you could do the following in the event:
Drawback is that the user don't receive any feedback if the cursor is currently inside the higher building range before he actually try to build the entity.

What I could imagine is using the OnPut-event, which doesn't depend on the building-range.
So you could do the following in the event:
Code: Select all
1) check if the event-position is inside the new custom build range
2) check if the item/entity that is currently attached to the cursor can be placed there (there is a mehtod for this)
3) use game.createentity to create the entity there and decrease the item-count in the player's inventory
if 1) or 2) fails: do nothing
- Lukasecicek
- Inserter
- Posts: 26
- Joined: Mon Mar 11, 2013 9:42 am
- Contact:
Re: Game player build range
Thank you very much, i will definetly try that approach, but it gets more complicated than i though 
