ID:155509
 
how to make a poll system...for a dbz game!?
thanks in advance
Could you please go into a little more detail on what you're looking to do? I can think of a lot of different ways of doing polling / voting systems that depend on the context of what you're doing, assuming that's what you are wanting to do. Cheers.
In response to Stephen001
i want to have poll system in which people get to choose between yes/no if a GM starts a poll..he can ask questions etc..and it should open up a new window.
Thanks
In response to Gokussj22
that seems like it will be a hard thing to do.

Search for a guide on google or something
In response to King_ed
To tell him to go search on google makes it seem impossible for this community. It is 5:42 AM here. I am going to sleep but when I wake up i'll try to rememeber ane i'll com and do this for you. It is a simple code. Won't be too hard to complete. Actually, a game I have been working on will be usuing this code so I think this topic will benefit both of us ;) Just wait a while and i'll code it for you (i am a late sleeper lol so i will be gone for 9-15 hours unless my niece or cousin wakes me up.)
In response to Xirre
no problem...help will be appreciated
In response to Gokussj22
Like Stephen001 said, there are a lot of different ways this could be achieved; there is no "polling" system, it's whatever you want it to be.

The simplest I can think of right now is a for() loop checking for all mobs with clients attached, then alerting with the question and Answer1/Answer2 buttons. That would look like this:

verb/Poll_World(var/Q as text,var/A1 as text,var/A2 as text)
var/Answer1 = 0
var/Answer2 = 0
for(var/mob/M in world)
if(M.client && M != usr)
switch(alert(M,"[Q]","Poll","[A1]","[A2]"))
if("[A1]")
Answer1++
else
Answer2++
alert(usr,"[A1]:[Answer1] -- [A2]:[Answer2]")


The major drawback to this, aside from being ugly, is that it will only poll users one at a time, and if someone doesn't respond in a timely manner, it will hold up the entire queue.



The second thing I can think of, and is a bit more advanced, is using an interface window/panel what-have-you to pre-setup a poll template, then configure the text in it before showing it to the player. For this I refer you to the developer resource section of the website, LummoxJR's interface guides would be an excellent place to start.

http://www.byond.com/developer/ (tutorials at the top)
In response to Jotdaniel
thanks man..have been looking forward to it