Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help (https://forums.graalonline.com/forums/showthread.php?t=44920)

DarkShadows_Legend 05-14-2003 08:27 PM

Help
 
How would I find out who hit me. Like let's say I want to make something that keeps track of who hit me and what their sword power was. What commands would I use for this?

Projectshifter 05-28-2003 03:48 AM

Era uses something like this. But graal knows you got hit and that's all.
---Shifter

Pokilty 05-28-2003 02:11 PM

You should also look up triggeraction if you don't know that, you'll need it if you want to script the system with maximum efficiency =D (or you can use a for loop, which is less reliable)

Tseng 05-28-2003 04:54 PM

Quote:

Originally posted by Pokilty
You should also look up triggeraction if you don't know that, you'll need it if you want to script the system with maximum efficiency =D (or you can use a for loop, which is less reliable)
Why in the world would you want to use a for loop?

Knuckles 05-28-2003 10:14 PM

Quote:

Originally posted by Kaimetsu
Best way would be to use a rescripted sword system with serverside hit detection - if the server decides that a successful strike has been made then it sets a clientr.string with the attacking player's account name.
Yea, just use triggeraction's with the #a, in one of the param's.
Then if(action), then set a string with the param.

Quote:

Era uses something like this. But graal knows you got hit and that's all.
Yea, setshootparams...

Pokilty 05-29-2003 12:25 AM

Quote:

Originally posted by Tseng


Why in the world would you want to use a for loop?

you wouldn't :p I'm just saying you could use a for loop and players[i].x and etc. to find the other players position then use a with(getplayer(#a(i))) but that would be very inefficent compared to the triggeraction

GoZelda 06-18-2003 03:37 PM

Re: Help
 
Quote:

Originally posted by DarkShadows_Legend
How would I find out who hit me. Like let's say I want to make something that keeps track of who hit me and what their sword power was. What commands would I use for this?
As it already was said, triggeraction... If you want to use the standard sword system then make a extra -system npc...
If you press S then have a triggeraction at a certain place,

triggeraction the.x,the.y,keeptrack,#a,players[index].swordpower;

Also the system should contain:

if (actionkeeptrack){
setstring client.wholasthit,#P1;
setstring client.wholasthitswordpower,#P2;
}


All times are GMT +2. The time now is 01:26 AM.

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