If you have played any of the fallout games you will get this example, when you create a character you can add or subtract from char points and what not. I am having a hard time figuring this out in byond.
Here is a picture of what I hope to somewhat achieve.
http://firsthour.net/screenshots/fallout/ fallout-character-creation-bloody-mess.jpg
So, how can you have separate atoms--in my case objects--alter the icon state of another obj.
Example of how far I get in the code:
obj
test
var/currentNum=3
icon='number.dmi'
numbers
icon_state="3"
proc/updateNum()
switch(currentNum)
if(1)
icon_state="1"
if(2)
icon_state="2"
if(3)
icon_state="3"
if(4)
icon_state="4"
if(5)
icon_state="5"
arrows
Up
icon_state="up"
Click()
currentNum++
updateNum()
Down
icon_state="down"
Click()
currentNum--
The icon states are all numbered, if you notice in the Up arrow object the proc updateNum() and nothing to refer to.
I can't figure out how to get it to talk to the numbers object. I would figure something like
Click(obj/o as obj/test/numbers) // Does not work
I feel I am rambling, please let me know if I need to re-word my question for better comprehension.
This wont work, and I forget how to make N the numbers object...unless you make a new /obj/test/numbers/ at world/New():
Hope this help! :D