I have a turf called dirt and another icon with four icon_states of different looking grass. I would like to know how to create a code that makes each space with dirt on it have one of the four icons of grass. or do i have to do it manually?
thanks in advance
ID:156934
Jun 29 2010, 10:18 pm
|
|
In response to Midgetbuster
|
|
No. I mean like the grass icon will appear ontop of the dirt. As if like an overlay.
The grass file kinda looks like a weed. it is small compared to the dirt square. |
In response to Lusodante
|
|
arr
Nah its easier to just add them in the map editor i think using Ctrl + Click. |
In response to Midgetbuster
|
|
No offence intended, but have you considered that given you knowledge on BYOND, your information might be misleading and thus could actually harm the development process of a beginner?
Or, in other terms, while you still seek help (quite frequently even), it might be better to keep a low profile trying to help others. |
You could pick a random entry from a list of valid icon_states (which you might want to store and reuse). This likely would happen either during the procedure initialising your world, or, if you do not need one, during instantiating the atom. Then simply apply the result and add to turf's overlays list.
This comes with the cost of some resource impact, but allows for easy, modular design and would add some random appearance to your world. |
In response to Schnitzelnagler
|
|
Did you stop to consider that the time it takes most of you to respond i could be of some use. He did not ask for a full quickfix i dont respond to those due to my knowledge.
Did you also stop to consider that i can say whatever i wish? i simply offered my 2 cents if a person with more knowledge then me then decides to offer his assistance by all means go for it. And also i stated there was a way to do it knowing that it would take resources on runtime and offered a different solution instead (which was the Ctrl+click on the map during creation) which i think was a valid suggestion but heck im just a noob so ignore me |
In response to Midgetbuster
|
|
He said there was no offense intended, and if you reread his message, he said it with all kindness. There is purpose to his words. If you do not know how to do something, offering how you think you know it is not beneficial to the beginner, and will therefore create a beginner that doesn't have very good coding habits, or even skills for that matter. Both of you are right. Your way takes more time, and less resource impact. His takes less time and more impact. Therefore, the beginner can choose which way he wants to do.
This being directed at the person asking the question for this topic, if you are making a game that will have many things in it, then using more resources is not the best idea. But if you are creating a simple, casual game, then by all means, choose whichever you wish. |
In response to Schnitzelnagler
|
|
I did that correctly and really liked the effect i got from it. I also created a new invisible obj and did the same thing and so i could choose which turf the grass would appear on, and it was great. thanks for the help.
|
if so then yeah i think there is a code but its easier to just do it in the map file