Thread: Event System
View Single Post
  #14  
Old 02-24-2008, 05:37 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Side note:
PHP Code:
  this.event = {
    
"Event Name","Event level",x,y,
    
"Event 2 Name","Event 2 level",x,y,
  }; 
Why not use multi-dimensional arrays?

On Utopia, we are doing:

PHP Code:
  this.events = {
                  { 
"Auction""utopia_events_auction.nw"33.540"utopia_money.png" },
                  { 
"Chance""utopia_events_chance.nw"817"utopia_ec.gif" },
                  { 
"LMS""utopia_events_lms.nw"307"ut_icon-57.gif" },
                  { 
"Laser Tag""utopia_events_lt-lobby.nw"3219"utopia_igun-icon.png" },
                  { 
"Lucky Prize""utopia_events_luckyprize.nw"27.526.5"utopia_ec.gif" },
                  { 
"Ring""utopia_events_ring.nw"3424"utopia_igun-icon.png" },
                  { 
"Spar Tourney""utopia_events_spararena.nw"3121.9"ut_icon-57.gif" },
                  { 
"Tag Team Spar""utopia_events_tagteam.nw"32.321.2"utopia_weapon-Chaingun-icon.gif" },
                  { 
"Gravity Race""utopia_event-gravity.nw"5.856"utopia_empty.png" },
                  { 
"Trick Race""utopia_events_trickrace.nw"1222"utopia_staffblock.gif" },
                  { 
"Quiz""utopia_events_quiz.nw"4024.5"block.png" }
                }; 
Multi-dimensional arrays ftw

I should probably release Utopia's event system ... it's fairly more complex. Probably harder to install. Easier to use, I would imagine.

I will talk to Ork...
__________________
Reply With Quote