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.5, 40, "utopia_money.png" },
                  { 
"Chance", "utopia_events_chance.nw", 8, 17, "utopia_ec.gif" },
                  { 
"LMS", "utopia_events_lms.nw", 30, 7, "ut_icon-57.gif" },
                  { 
"Laser Tag", "utopia_events_lt-lobby.nw", 32, 19, "utopia_igun-icon.png" },
                  { 
"Lucky Prize", "utopia_events_luckyprize.nw", 27.5, 26.5, "utopia_ec.gif" },
                  { 
"Ring", "utopia_events_ring.nw", 34, 24, "utopia_igun-icon.png" },
                  { 
"Spar Tourney", "utopia_events_spararena.nw", 31, 21.9, "ut_icon-57.gif" },
                  { 
"Tag Team Spar", "utopia_events_tagteam.nw", 32.3, 21.2, "utopia_weapon-Chaingun-icon.gif" },
                  { 
"Gravity Race", "utopia_event-gravity.nw", 5.8, 56, "utopia_empty.png" },
                  { 
"Trick Race", "utopia_events_trickrace.nw", 12, 22, "utopia_staffblock.gif" },
                  { 
"Quiz", "utopia_events_quiz.nw", 40, 24.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