View Single Post
  #1  
Old 03-06-2010, 08:02 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Making a WNPC wait until Level functions are executed

Is there a way to make a function in a WNPC(say, onPlayerenters()) wait until the same function in the level is called before continuing? For example I have a scripted map that relies on default map being disabled. However on servers like UN with extensive level scripts running all the time and some enabling the default map, depending on circumstance and lag, the level function is called after the WNPC map's, thus reenabling the default map after my script has disabled it.

This is what I tried:
PHP Code:
function onPlayerenters() {
  
disablemap();
  
waitfor(level,"onPlayerEnters",5);
  
player.chat "test";
  
disablemap();

But that doesn't seem to work. Any ideas?
Reply With Quote