Code:
area/tournament/arena1
area/tournament/arena2
Problem description:So i want to be able to create multiple areas for my tournament system/duel system. So say if two people are in that area no one else can enter then it would search for the next area till it found an empty area. Would i say have to make a list for area area with a max number of people allowed in that list 2? Or would that be inefficient and stupid?
Code: area/tournament/arena1 |
Basicly i wanted it to come from a verb not from walking into a certain area.
for example mob/verb/challenge() This all seems inefficient to me. But I'm not sure. Could be going about this totally wrong like I said. I assume I could use Entered() to set if it was inuse or not but not too sure on that either. |
area/tournament/arena1 |
Thankyou FIREking this was most helpful. Could i possibly make the lists global vars so I could check max participants from the challenge?
|
Rickoshay wrote:
Thankyou FIREking this was most helpful. Could i possibly make the lists global vars so I could check max participants from the challenge? Yeah, just move it out of the /area/tournament/arena1 define and all the code will still work but you'll need to empty the list when the participants leave area/tournament/arena1 Keep in mind this means you need to be a good programmer and never set loc directly, because that won't call Move() which won't call turf.Exit() which calls area.Exit() by default. So if there's anything that could cause the loc of the participants to be set directly while they're in a tournament, you'd need to prepare for that case scenario. A sloppy way would be a failsafe... area/tournament |
Could i create an a part of the area map that have to walk to leave that area?
An example image here of what i mean http://gyazo.com/c66a6da35b7e14e37149c48cf577e6e1 Just got that second part after i posted this. Surprisingly that actually made sense to me. Once again thankyou so much. |
When i took participants out of arena1 for some reason participants.len stopped working, any idea as to why? Sorry for being so much trouble.
|
In response to Rickoshay
|
|
Rickoshay wrote:
Could i create an a part of the area map that have to walk to leave that area? yeah just make an arena1_exit and set it to remove the participant on Entered() of that arena1_exit |
In response to Rickoshay
|
|
Rickoshay wrote:
When i took participants out of arena1 for some reason participants.len stopped working, any idea as to why? Sorry for being so much trouble. you need to make sure its the same name. Also make sure its defined as a list. |
In response to FIREking
|
|
FIREking wrote:
you need to make sure its the same name. Also make sure its defined as a list. Bit blind there, I missed out the list. Thank you so much for the advice. Think i've learnt more from you in the 10 minutes then I have in about 10 days. |
it's basically a matter of needs and preference.
You can use areas or you could not, you could closed off the arenas and change location of participants or allow them to walk in.
It's basically what feel you want the system to have.