Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   hitplayer (https://forums.graalonline.com/forums/showthread.php?t=30069)

BBflat 05-26-2002 05:41 AM

hitplayer
 
Someone please help. I can't get hitplayer to work with an index greater than 0. (I can't make it hit everyone in the room.) I'll give you an example, and please, tell me what I need to do to make it work.

NPC Code:

if (playerenters)
{
timeout = .05;
}
if (timeout)
{
this.test = testplayer(30,30);
hitplayer this.test,1,30,30;
timeout = .05;
}



It only works for index 0 online for me. What do I need to do to hit other people?

TDO2000 05-26-2002 05:46 AM

try to use a timereverywhere in the playerenters-part

BBflat 05-26-2002 05:47 AM

Quote:

Originally posted by TDO2000
try to use a timereverywhere in the playerenters-part
Actually, I used if (weaponfired) and it was a weapon, but that should work anyway.

Spanko 05-26-2002 05:51 AM

Does this work?
NPC Code:
if (weaponfired) {
for (i=0;i<playerscount;i++)
hitplayer i,1,playerx,playery;
}


Because if it does, testplayer isn't working properly, or isn't being used properly. (Since you need to add 1.5 and 2 to a players x and y respectively to make it detect the actual player.)

BBflat 05-26-2002 05:52 AM

Quote:

Originally posted by Spanko
Does this work?
NPC Code:
if (weaponfired) {
for (i=0;i<playerscount;i++)
hitplayer i,1,playerx,playery;
}


Because if it does, testplayer isn't working properly.

No, I tried that, that doesn't work, either. The problem is the hitplayer.

Kaimetsu 05-26-2002 05:53 AM

Re: hitplayer
 
Don't bother with a timereverywhere. Try using the debugger to see if it's the testplayer or the hitplayer that's not working. I don't know how the information would help us, but it's a start.

[edit]
Oops, spent too long posting ^^;;
[/edit]

Spanko 05-26-2002 05:53 AM

Quote:

Originally posted by BBflat

No, I tried that, that doesn't work, either. The problem is the hitplayer.

You could always substitute it with hitobjects, though that looks less pretty.

BBflat 05-26-2002 05:54 AM

Re: Re: hitplayer
 
Quote:

Originally posted by Kaimetsu
Don't bother with a timereverywhere. Try using the debugger to see if it's the testplayer or the hitplayer that's not working. I don't know how the information would help us, but it's a start.
I've done a lot of debugging, and it is hitplayer that is the problem. I got testplayer to work.

BBflat 05-27-2002 11:14 PM

Okay, I have done further testing, and I hereby conclude that hitplayer only works offline. What's the point of that?!

Kaimetsu 05-28-2002 09:21 AM

Quote:

Originally posted by BBflat
Okay, I have done further testing, and I hereby conclude that hitplayer only works offline. What's the point of that?!
Want me to move this to the Bug Reports forum so Stefan'll see it?

BBflat 05-30-2002 09:38 AM

Quote:

Originally posted by Kaimetsu


Want me to move this to the Bug Reports forum so Stefan'll see it?

See, I'm not sure if it is a bug or if that was the way it was meant to be. In any case, I think this kind of thing should work online. If you would move it to the bugs section, that would be great.

Kaimetsu 05-30-2002 09:41 AM

Quote:

Originally posted by BBflat

See, I'm not sure if it is a bug or if that was the way it was meant to be. In any case, I think this kind of thing should work online. If you would move it to the bugs section, that would be great.

Okiedokie.

Tyhm 05-30-2002 11:57 PM

Oh yeah - you're not trying to use it on saints, are you?

hitplayer works like hitobjects in that it simulates a sword hit, pretty sure...

BBflat 05-31-2002 12:35 AM

Quote:

Originally posted by Tyhm
Oh yeah - you're not trying to use it on saints, are you?

hitplayer works like hitobjects in that it simulates a sword hit, pretty sure...

Correct, I am not trying to use it on a saint.

DarkHero2002 06-01-2002 02:12 AM

hmm i dunno..i hate scripting


All times are GMT +2. The time now is 11:02 PM.

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