View Single Post
  #4  
Old 07-26-2012, 03:57 AM
Bleachlover551 Bleachlover551 is offline
Soul Reaper
Bleachlover551's Avatar
Join Date: Jul 2012
Location: Brunswick
Posts: 34
Bleachlover551 is an unknown quantity at this point
Quote:
Originally Posted by callimuc View Post
If it's a weapon, than you can use this for your light:
PHP Code:
function onCreated() {
  
findPlayer("yourAccountHere").addWeapon(name); //add the weapon to yourself
}
//#CLIENTSIDE
function onCreated() {
  
this.usingLight false//set the flag to false; not required but I gues its better
  
this.image "crystalflash.png"//I think it will change the inventorys icon, not sure
  
onTimeOut(); //would use it with a onWeaonFired() toggle in a weapon if it shouldnt stay there all the time; made an example below
}
/*
function onWeaponFired() {
  this.usingLight = !this.usingLight; //toggles the flag (true/false)
  if (this.usingLight) onTimeOut(); //if true -> use the timeOut() function
  else { //else stop the timer and hide the image
    setTimer(0);
    hideImg(200);
  }
}
*/
function onTimeOut() {
  
with (findImg(200)) {
    
image "crystalflash.png";
    
mouseScreenX-0.5;
    
mouseScreenY-0.5;
    
alpha 0.75;
  }
  
setTimer(0.05);

And this for your bomb:
PHP Code:
function onCreated() {
  
findPlayer("yourAccountHere").addWeapon(name); //add the weapon to yourself
}
//#CLIENTSIDE
function onCreated() {
  
this.usingBomb false//set the flag to false; not required but I gues its better
  
onTimeOut(); //would use it with a onWeaonFired() toggle in a weapon if it shouldnt stay there all the time; made an example below
}
/*
function onWeaponFired() {
  this.usingBomb = !this.usingBomb; //toggles the flag (true/false)
  if (this.usingBomb) onTimeOut(); //if true -> use the timeOut() function
  else setTimer(0); //else stop the timer and hide the image
}
*/
function onTimeOut() {
  
putexplosion2(41mousex-1mousey-1); 
  
setTimer(0.05);

will other player be able to see the image as well?
Reply With Quote