Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
flag question

 
Post new topic   Reply to topic Printable version
 View previous topic  Compiling AS3 Post :: Post Lots of segmentation faults?  View next topic  
Author Message
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Sat Jul 25, 2009 4:00 pm    Post subject: flag question Reply to topic Reply with quote

1. Is it possible to force/give a player a flag? If so, how could this be done?

2. In turf style flagging, is there a setting that allows the flag to be neutralized when the arena is created? (whenever I use fg_turf, the previous state of the flags, even after the arena is destroyed, seems to be remembered)
Back to top
View users profile Send private message Add User to Ignore List Send email
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sat Jul 25, 2009 4:39 pm    Post subject: Reply to topic Reply with quote

1. Use the FlagInfo struct with Iflagcore's SetFlags function. You'll want state = FI_CARRIED and carrier = that player.

2. You should be able to use SetFlags again but with carrier = NULL and freq = -1
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Sat Jul 25, 2009 7:04 pm    Post subject: Reply to topic Reply with quote

Thanks D1st0rt. If I did the following, would it work? What exactly does int count do?
Code: Show/Hide

FlagInfo fi;
flagcore->GetFlags(p->arena, 0, &fi, 1);
if (fi.state != FI_CARRIED)
{
    fi.state = FI_CARRIED;
    fi.carrier = p;
    fi.freq = p->p_freq;
    flagcore->SetFlags(p->arena, 0, &fi, 1);
}


As for the second one, I was hoping for just a setting, but oh well.
Back to top
View users profile Send private message Add User to Ignore List Send email
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Mon Jul 27, 2009 9:15 pm    Post subject: Reply to topic Reply with quote

Ok, well I'll answer my own question, it worked. But why is it that everytime I try to specify a flag location (fi.x/fi.y), it doesn't? The flag just warps sporadically according to the flag radius...


Edit: nevermind, I just have to not specify the flag state whatsoever, but rather I need to use the flag frequency (-1) instead to make sure that the flag is still neutral. Seems odd to me to do it this way.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 650 page(s) served in previous 5 minutes.

phpBB Created this page in 0.506341 seconds : 29 queries executed (83.7%): GZIP compression disabled