Thread: Baddie issue
View Single Post
  #2  
Old 05-24-2012, 12:11 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
If you're setting clientr.tempdmg client-side then the change isn't being seen serverside, therefore no damage is occurring.

Also update the chat when the baddy takes damage, not on a loop, that's very wasteful.

You can't 'timeout' faster than 0.1 seconds (and you should avoid doing so at all costs) on the server-side.

Try this:

PHP Code:
function onCreated() { 
  
this.setshape(13232); 
  
this.setImg("block.png"); 
  
this.health 500
  
this.maxhealth 500;
  
this.chat this.health "/" this.maxhealth;


function 
onWasDmg() { 
  
this.health -= 1;
  
this.chat this.health "/" this.maxhealth;

If it works then you need to fix your weapon system that triggers 'WasDmg'.
__________________
Quote:
Reply With Quote