im making a stratgy game and im using the tutirials. One tutorual told me to do this to make the Click proc.
Click() //overrides its Click() proc
loc = null //takes the clicked stone off the board
usr.holding = src //but "remebers" it
..() //calls the parent, just in case
I did it but it didn't work. Can anyone tell me how o fix it. This is my current code:
mob
verb
say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
obj //new obj prototype,
stone //a stone, belonging to the new object
icon = 'stone.dmi' //with the 'stone.dmi' icon assigned
turf
square //defines a "square" prototype, a kind of turf...
icon = 'square.dmi' //and has an icon named 'square.dmi'. In single quotes!
world //we set one of our world's characteristics:
turf = /turf/square //its default turf is the square turf.
world //we set one of our world's characteristics:
turf = /turf/square //its default turf is the square turf.
New() //overrides its New() proc
for (var/turf/square/T in world) //loops through all squares,
new /obj/stone(T) //putting a stone on each
..() //calls the parent
obj //new obj prototype,
stone //a stone,
icon = 'stone.dmi' //with the 'stone.dmi' icon assigned
New() //overrides its New() proc
icon_state = pick("","")//set each stone's icon state randomly
Mob
var/obj/stone/holding //a variable to keep track of held stones
ID:178306
May 29 2002, 11:43 am
|
|
mob/Man
icon = 'man.dmi'
Click()
usr << "Hi."
is bassically what a click proc is like.
- TheWizard