This is possible yes? Mafia has this. When either side wins, the game automatically reboots. How is that accomplished in code?
-Dagolar
ID:175600
![]() Mar 29 2003, 2:38 pm
|
|
![]() Mar 29 2003, 2:53 pm
|
|
world.Reboot()
|
I've never actually worked out with the control pad on byond before. How does it work exactly? I take it there's a procedure for assigning something to a direction or to that middle button. How is that done? This stuff must be like day one for some people.
-Dagolar |
The control pad (both the one on the screen and the number pad on the keyboard) simply calls the client verbs North(), East(), South(), and so on. You just define code inside these verbs.
|
Dagolar wrote:
Northeast()? Hit F1 in DreamMaker and search on these terms and you'll find them. |
Can't figure out how to apply it properly. How do you make it so that if a player presses the center button, they perform a verb. I thought that was simple, and it probably is...but I can't get it to work.
-Dagolar |
Dagolar wrote:
Can't figure out how to apply it properly. How do you make it so that if a player presses the center button, they perform a verb. I thought that was simple, and it probably is...but I can't get it to work. client/Center() Replace theverb and the parameters accordingly. |
I think I'll understand this if I get a basic verb (and example) working. Why doesn't this work:
client Center() usr.say() -Dagolar |
Dagolar wrote:
I think I'll understand this if I get a basic verb (and example) working. Why doesn't this work: Since Center is part of the client it's probably safe to use usr, but it's probably better to get in the habbit of avoiding usr. Each client has a mob var which is the mob connected to the client so use that instead. And from what you posted that should work but you're not passing anything to say which might be your problem since I'm guessing say takes a message as a parameter. You could do something like client/Center() |
Or, even more compact:
mob |
Now I'm getting frustrated. I did that exact code and I got the following errors:
Verbs.dm:127:error: Bad input type: Text I just don't know how to apply verbs to buttons, like the center button and the "northeast" button and that sort of thing. I've never tried before, and I'm having a heck of a time trying to find any examples of how to apply it. -Dagolar |
I'm trying to make it so that if you are one space away from an NPC, and you press the center button, you talk to them. What is the easiest way to do that?
-Dagolar |
This is what I mean. I have this:
obj Tomb icon = 'Turf-Town-Broken.dmi' icon_state = "TTombstone1" density = 1 verb Look() set category = "Communication" set src in oview(1) usr<<"This is a tombstone." then I have: client Center() ///??? How do I do it so that if the player hits the center button, it performs the Look() verb that is written into the tombstone obj? Or is there a better way to work this out? -Dagolar |
Dagolar wrote:
This is what I mean. I have this: How do I do it so that if the player hits the center button, it performs the Look() verb that is written into the tombstone obj? Or is there a better way to work this out? client This get's the turf infront of the player. Then if there are any objects on T it will call thier Look() function. |