marten-987b81fc6a004aed 0 Posted May 21, 2019 (edited) i am trying to make sense of the following:https://community.bistudio.com/wiki/Ylands_Game_logic_-_Entity_storageso i added a player role to the world and set a spawn place for it.and i added a entity storage to the worldin the player rols script i added an on spawn and added a add storage tile and selected my entity storage in world they are now linked wit a linein the entity storage i added the procedures as shown in the image on the wiki pagebut could not find the proper set so i added an on start event and define a local variable called m_point and assigned value 0 to it. Now i could click dan drag out a set m_point thing.added an block to the world and made it unique so i could add script to it and added an on interact to it and added the procedure from the entity storage to it . Had some trouble finding the add the black trigger object but found it eventually.Now on running i get an error saying m_point is not defined and looking at my addPoints procedure i see that the set m_point thing is now red.So i must be doing something wrong. the code does not error if i add the variable local declaration inside the funtion the side effect then is the number never gets higher then 1 :-)on a side node i also have keyboard without a del key so i cannot remove unwanted tiles with that keyboard. so now i temporay change pc for cleaning up tiles.player role:https://steamuserimages-a.akamaihd.net/ugc/794235249340537677/A1807DE6EF418917E433D4F12959CBDD7E8B59F2/on the block:https://steamuserimages-a.akamaihd.net/ugc/794235249340537030/E1797181F410B2398C1F357CF27427434150B18D/on the entity storage:https://steamuserimages-a.akamaihd.net/ugc/794235249340537364/478D8BB66D48EF92977A3D4335D1423F9F6618D3/ yes the last one is obviousely wrong now as i double declare the variable in on create and on awake. And in oncreate i typed in the wrong varname for the screenshot fixing that to m_point does not make things better though. ps sorry for the copy paste mess from my Original steam post Edited May 21, 2019 by marten-987b81fc6a004aed Share this post Link to post Share on other sites
Shadow72 187 Posted May 21, 2019 Hey Marten, the problem you are having is you are declaring m_points as a local variable. What you need to do is delete the local variables that you have made and create a global variable. To do this you need to click on the variables dropdown and click "Create New Variable". Share this post Link to post Share on other sites
marten-987b81fc6a004aed 0 Posted May 22, 2019 (edited) Oh wow ... I did not realize Create New Variable was a button ... i asumed it was a caption/title ... and just dragged in the local variable tiles assuming that was the way to go ? Edited May 22, 2019 by marten-987b81fc6a004aed Share this post Link to post Share on other sites