Script to hurt a player when shot by a bullet/projectile

[QUOTE=Bleachlover551;91836]can u fix my level i made im so lost and i actually read it.[ATTACH]2942[/ATTACH][/QUOTE]

You copy and pasted my code, made no effort to understand it and didn’t even use the fix I gave you.

if (playerenters){
  if (!isweapon)toweapons gun;
  this.spread = .2;
  this.fireFreeze = .1;
  this.bullets = 20;
  this.damage = 14;
}

if (weaponfired){
  if (this.bullets <= 0)return;
  this.angle = getangle(vecx(playerdir),vecy(playerdir))+random(this.spread*-1,this.spread);
  setshootparams gun,#v(this.damage);
  setani ap0_fire,;
  shoot playerx+1.5+vecx(playerdir)*2,playery+vecy(playerdir)*2,0,this.angle,0,0,era_bullet-light-test9,;
  this.bullets--;
  freezeplayer this.fireFreeze;
}

This is the fixed code, your gani is broken though…
Anyway… you’re dead to me and i’m not helping you again. Don’t even bother asking.

no actual i under it i fianl got it once i reread everything and also how would i make it hurt a npc and babby when it hits then

change the + to a -

Out thread, out!

fully formed babby

I think you’re all stupid.

i’m smart

is it possible to make the projectile hit a player but make the player have his/her own hurt gani, because i made the gani but all i need is a script for it i tried plugging in values and actually trying my best but nothing came of it. lol so if u could help me that would be so coolz…(:

replaceani hurt,yourgani;

i only want it to be custon when that certain bullet hit them

Define the gani you want the player to use when you send the projectile then.

setshootparams someGani;

if (actionprojectiles){
setani #p(0),;
}

[QUOTE=tricxta;93367]
Define the gani you want the player to use when you send the projectile then.

setshootparams someGani;

if (actionprojectiles){
setani #p(0),;
}
[/QUOTE]

oh so lets say my gani name is hurt-fairy i would put if (actionprojectiles){setani hurt-fairy,;}? and futher more will this work if i have my scipt[CODE]//#CLIENTSIDE

function onWeaponFired() {
while (keydown(4)) {
FireGun();
sleep(this.gun.firerate);
}
}

function FireGun() {

setani(this.gun.firegani, “”);
temp.angl = getangle(vecx(player.dir), vecy(player.dir))+random(this.gun.spread*-1,this.gun.spread);
shoot(player.x + 0.5 + vecx(player.dir), player.y + vecy(player.dir), player.z, temp.angl, 0, 0, this.gun.bulletgani, player.dir);
}
[/CODE] and then

[CODE]join(“class_gun”);
//#CLIENTSIDE
function onCreated() {

this.gun.spread = .053;
this.gun.speed = 5;
this.gun.reload= 50;
this.gun.load = 50;
this.gun.firerate = 1;
this.gun.firegani = “fairybomb”;
this.gun.bulletgani = “fairybomb-throw”;

}[/CODE]

i dont think i even have a script for the projecttile to be found using the script im using now but this one is more easier but im so lost right now can u help?

HEY THIS IS GS2 WHICH DOES NOT WORK ON GRAAL REBORN

I’m 90% sure that he’s scripting for Official and posting about it here.

I’m 100% sure he’s either A) stealing scripts for his “epic sever” on graal reborn from some random dev noobzor242153 server on GO which are probably broken and in GS2 then posting them here or B) searching for scripts on the Internet, miraculously finding some on OGCC and then because he doesn’t know the level editor only uses GS1 posts them here because no one on OGCC likes him due to his lack of brain and use of grammar.

[QUOTE=dylan;93373]I’m 100% sure he’s either A) stealing scripts for his “epic sever” on graal reborn from some random dev noobzor242153 server on GO which are probably broken and in GS2 then posting them here or B) searching for scripts on the Internet, miraculously finding some on OGCC and then because he doesn’t know the level editor only uses GS1 posts them here because no one on OGCC likes him due to his lack of brain and use of grammar.[/QUOTE]

Pardon me, but…

QUIT STATING THE OBVIOUS.

lol guys

stop being trolled by the moron

Bayne Level: 9000.1