Thread: Vibration(ish)
View Single Post
  #6  
Old 05-24-2007, 05:37 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
I used a timer and cos, so that it gave a vertical shaking. I'll see if I can get the formula.
Nevermind, it seems I'm having that 'you don't have admin rights' problem everyone else is. So ya... can't access the scripts I had online.
Anyways it was something like:
PHP Code:
function onWeaponfired() {
  
this.force=.5// force of the initial explosion
  
setTimer(0.05);
}

function 
onTimeout() {
  if (
this.force>0) {
    
this.angle=(this.angle+pi)%pi*2;
    
setfocus(player.x,player.y+cos(this.angle)*this.force;
    
this.force-=0.05;
    
setTimer(0.05);
  } else 
resetfocus();

I haven't actually what I just wrote though, so there may be problems.
Reply With Quote