Jump to content

RESOLVED [YLD-24904] Does not always remove objects from entity label

Recommended Posts

Posted (edited)

After work of the map, the counter in the Entity Label does not delete objects. The example shows that if you sleep for two days (adding Entity Label during growth) and try to collect grass, then the Label add/remove counter is often lost. At the same time, if the "Get Entity Count (Entity label)" can ignore this and continue to work normally, then the "Random Array Item (Array)" goes into error.



## Error
#  has no properties (Plants)
Stack trace:
GET Entities (#15, Line:36, Column:66) in Timer (ID:8)
On Trigger() (#1, Line:35, Column:12) in Timer (ID:8)


#logic 1 { // Spawn
  function onPlayerCreated (player_1) {
    player_1.changeRole(Ylands.logics[5], true, true);
    Ylands.logics[3].enableForPlayer(player_1, true);

#logic 2 { // Plants
  function onCountChanged (old_1, new_2) {
    for (player_3 of Ylands.logics[6].entities)
      Ylands.logics[3].getWidget(3, player_3).text = "old: " + old_1 + " new: " + new_2;

#logic 4 { // s
  function onGrow (plant_1) {

#logic 5 { // player
  function onPlayerConnected (player_1) {
  function onPlayerDisconnected (player_2) {

#logic 8 { // Timer
  function onTrigger () {
    var robject_2 = Ylands.array.randomArrayItem(Ylands.logics[2].entities);
    if (Ylands.isEntity(robject_2) == true) {
      for (player_1 of Ylands.logics[6].entities)
        Ylands.logics[3].getWidget(4, player_1).text = robject_2.name + " :: " + robject_2.position;


To repeat: run the map. sleep for two days. to collect grass.
I enclose the map file in upload (Scenarios).
Reproduced this error on different computers. And I apologize for my English.


Edited by Heidenlarm

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now