TobiaszPL Posted June 15, 2019 Share Posted June 15, 2019 Heyy :c...i need help, still trying to make my Script to grow trees and now im writing function for Planting new trees :DATM values like Health / Water / Fertilize etc. are random i need way to store values for cells for example how many water there is or how many soil etc. my only idea is to create big trigger box like cell and when player enter this trigger box ( cell )script will change "terrain type" and "terrain values" to this what player enter ofc. it will change GlobalValue and this GlobalValue will be also in TreeGrow script but... my world is big xDand making big trigger box on every cell will take a lot of time :c... is there any other way to "store" values in Cell? #Sry_for_my_Bad_English :D lol xD Link to comment Share on other sites More sharing options...
Evangela Posted June 15, 2019 Share Posted June 15, 2019 (edited) Your English isn't bad. It is just lazy, and to be frank, when you keep pointing it out like that, it makes me less inclined to help in anyway I can. Not sure what you mean by "Cell Var". Scripts can hold any value or object you want, with a variety of ways to do such, even with triggers. The thing about the trigger method though is, you need to make sure the trigger doesn't reset with the Cell, or all values will be lost/reset. Edited June 15, 2019 by Rasikko Link to comment Share on other sites More sharing options...
TobiaszPL Posted June 15, 2019 Author Share Posted June 15, 2019 Ugh xDFor example we have 4 cells Cell [0][0]Cell [1][0]Cell [0][1]Cell [1][1] and i need something like "GetCellValues" or something xDugh hard to explain for me T_T C++struct CellStructure{int WaterLevel; // have info. how many water is on cellint SoilLevel; // how good ground is for plantsint SunLevel; // how much sun in on this cellint GroundType; // which type is this cell ( for example [ Forest ] [ Beach ] [ Mountains ]}MyCell; CellStructure GetCellValues(){ return MyCell } i want to create values ( and they will be static ) about terrain and then get those values when player use 4 example "Plant Tree Spell"to decide how fast tree will grow etc. ok, maybeHow to create spell that tells me which type is cell? for example Player use Spell and Debug Notification show [Forest] or [Mountain] or [unknow]How Spell can know which type cell is ? :D i know there was mod on LoversLab that show if cell is Dungeon or Forest or City or Wilds but1) i dont remember name of this mod2) its old mod maybe deleted already xD egh :c... Link to comment Share on other sites More sharing options...
foamyesque Posted June 16, 2019 Share Posted June 16, 2019 Cells don't have a type, exactly. All that information is handled through Locations, instead, to which cells belong. Those locations can be stored in aliases, which will allow you to write a script for the alias that can store the information you need. Link to comment Share on other sites More sharing options...
TobiaszPL Posted June 16, 2019 Author Share Posted June 16, 2019 Like i said, i dont want to use Aliases1) idk how they work ( i know only basic, i know that Alias can be Map Marker in Quest )2) there is no good tut about aliases3) i pref to use way that i know good instead of learning new Bfff #250KbLimit xD Link to comment Share on other sites More sharing options...
foamyesque Posted June 16, 2019 Share Posted June 16, 2019 There's a perfectly good tutorial on the CK wiki walking you through how to create aliases, but -- and this is the key point -- if you want to extend something's function without causing compatibility issues Alias are the way to do it. I know you've got this bugbear about trying to smash everything into the C coding you're more familiar with but you're denying yourself one of the most useful and powerful tools you have. Link to comment Share on other sites More sharing options...
Recommended Posts