Jump to content

[LE] Help :c "Cell Var?" xD


Recommended Posts

Heyy :c...

i need help, still trying to make my Script to grow trees

 

and now im writing function for Planting new trees :D

ATM 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 xD

and 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

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 by Rasikko
Link to comment
Share on other sites

Ugh xD

For 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 xD

ugh hard to explain for me T_T

 

C++

struct CellStructure{

int WaterLevel; // have info. how many water is on cell

int SoilLevel; // how good ground is for plants

int SunLevel; // how much sun in on this cell

int 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, maybe

How 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 but

1) i dont remember name of this mod

2) its old mod maybe deleted already xD

 

egh :c...

Link to comment
Share on other sites

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

Like i said, i dont want to use Aliases

1) 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 aliases

3) i pref to use way that i know good instead of learning new

 

Bfff

 

 

#250KbLimit xD

 

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...