mob
Stat()
statpanel("Votes")
stat("Testing")
stat(/obj/RebootVote)
stat("Testing")
How would I be able to make somthing that If there are no Owners in the world that This stat panel shows up? And how come I cant see the stat(/obj/RebootVote)?
ID:272384
Jun 23 2008, 1:12 pm
|
|
mob How would I be able to make somthing that If there are no Owners in the world that This stat panel shows up? And how come I cant see the stat(/obj/RebootVote)? |
Jun 23 2008, 1:36 pm
|
|
In response to Andre-g1
|
|
Andre-g1 wrote:
mob Almost got it it would be stat(P) nice try though. |
King killer 113711 wrote:
mob How would I be able to make somthing that If there are no Owners in the world that This stat panel shows up? if(no owners in world) Initially, since you're a beginner (or at least you're having beginner errors) keep it simple. This would involve keeping track of the owner status (you likely want any GM to disable triggering this, not only the owner, too). You'd probably best do it by keeping a global list of GMs logged in, which would come in use for other things. Basically, you could then check if there are any GMs on by checking the list. And how come I cant see the stat(/obj/RebootVote)? Because it's a type path, not an object instance. You really should read this. Get studying with ZBT's tutorials and then the DM Guide, or you're going to be making topics about relatively simple things like this for a long long time. |
In response to A.T.H.K
|
|
Thanks for the help all of you
|
In response to A.T.H.K
|
|
The issue there wouldn't be quite that, but that doing extensive operations in Stat() itself is a bad idea, as well as the creation of an object per mob (player in this case), due to the fact Stat() is re-called with a frequency of 1-3 ticks or so.
|
You have to have a reference to the object, not just a typepath.
Also, it's better to have a datum than an /obj for handling votes, as well. I'd set the whole system up like this: #define WINNER -1 Now, onto your problem with the owner. One way to handle it would be as such: //This is assuming there is only a single owner. Now, to tie it in with your statpanel system: mob/Stat() |
In response to Popisfizzy
|
|
Popisfizzy wrote:
Also, it's better to have a datum than an /obj for handling votes, as well. His usage of the /obj was obviously pretty much purely for making it initiate-able through a click. Which also can't be done through a datum (only). |