Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 06-01-2003, 05:15 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Use hitobject... =o
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #3  
Old 06-01-2003, 06:06 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
put the strequals inside the keydown, nesting events inside of flags screws stuff up like that
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #4  
Old 06-01-2003, 09:56 AM
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
Too late, already fixed with triggeraction
__________________
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
Reply With Quote
Reply


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:08 PM.


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