I was wondering if any of you could help a noob like me at scripting. I’m trying to create a flag for a guild tower. Where you kill the flag and then your guild owns it, etc. Pretty straight forward. It works fine, but it’s a little glitchy.
When you get it down to 0, if there are two guilds simultaneously slashing it, it will just sit there for a few seconds before setting itself back to 50 hearts. I am thinking that it’s because of the wait 3;, but I want that in there so that it shows that the flag was captured. So, hypothetically, you could have two opposing guilds just slashing at it forever without it actually going back to fullhearts and saying that it is controlled.
If anyone could help me, that would be awesome.
[CODE]if (created){
timereverywhere;
timeout = .05;
}
if (timeout){
message Fort controlled by: (#s(server.guildflag));
timeout = .05;
}
if (washit&&!hearts==0){
hearts -= .5;
}
if (washit&&hearts==0){
setstring server.guildflag,#g;
message Fort captured by: (#s(server.guildflag));
sleep 3;
hearts = 50;
timeout = .05;
}[/CODE]