Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-31-2003, 09:08 PM
Nitkizi Nitkizi is offline
Nil Recurring
Nitkizi's Avatar
Join Date: Jun 2002
Posts: 1,911
Nitkizi is on a distinguished road
Send a message via AIM to Nitkizi
Need help with hitplayer..

Okay, does anyone have any idea or reason why hitplayer doesn't work properly? It only allows you to hit other players when they have it equipped also, but not when they don't have it equipped.

Quote:
//#CLIENTSIDE
if (weaponfired) {
if (this.use = 0) {
equip();
this.use = 1;
} else {
unequip();
this.use = 0;
}
}

if (strequals(spear_sl_stab,#m)) {
if (keydown(5)) {
for (this.p = 1; this.p < playerscount; this.p++) {
this.dx = playerx - players[this.p].x;
this.dy = playery - players[this.p].y;
this.dist = (this.dx^2 + this.dy^2)^0.5;
if (this.dist <= 3.5) hitplayer this.p,1,playerx,playery;
}
}
}

}

function equip() {
replaceani idle,spear_sl_idle;
replaceani walk,spear_sl_walk;
replaceani sword,spear_sl_stab;
}

function unequip() {
replaceani idle,idle;
replaceani walk,walk;
replaceani sword,sword;
}
__________________
I got wiring loose inside my head
I got books that I never ever read
I got secrets in my garden shed
I got a scar where all my urges bled
I got people underneath my bed
I got a place where all my dreams are dead
Swim with me into your blackest eyes

Last edited by Nitkizi; 05-31-2003 at 10:46 PM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.