![]() |
is there something like.....
is there something like if (hitby(<weaponname>)){......}
and if there is could you tell me the command for it. |
umm
not exactly the weapons...the only things you can determine is if:
1: The NPC was hit by a sword if (washit) 2: The NPC was hit by an explosion if (exploded) ( i think it's exploded) 3: The NPC was hit by an arrow if (wasshot) 4: The NPC was pelt by an object if (waspelt) ( there are also things like waspeltbybush and stuff ) But, I dont believe the NPC can check for the weapon's name, unless you put a param in your weapon and set a triggeraction aswell. |
k thanks
|
are you sure there isnt any other way caus the apple trees on 2k1 work diffirent bud i dunt know how
|
use triggeraction
|
Quote:
|
mm..
can someone tell me something about triggeraction
|
well, the syntax is:
triggeraction x,y,actionname,param(s); using this will call actionname on the player/npc on that x and y example: NPC Code: this is just a way to use triggeraction in one npc but, you could take the if (action....) part and put it in a seperate npc, and just change the x and y varibles in the first npc :D |
so in action name i would fill in the weapon name or somethin'
|
well
Triggeraction works just like a built in call flag (like if (playerenters)), except, it's only called when it is activated by an NPC. The only way to activate it is for an NPC to use triggeraction other'sx,other'sy,<actionhere>,#g;
supposing the NPC you want triggered is on other'sx,other'sy, it would call <actionhere>, and send the message that #p(0)=#g (or your guild name, let's say it's happy clan, the point for the NPC is 33,33 and the action is called "dostart") you'd write in the Weapon NPC NPC Code: in the other NPC NPC Code: The reason the triggering point is 33.25,33.25, Is because the action MUST be triggered on a visible spot on the NPC (part of the image that is NOT transparent) For more info on triggeraction, I suggest you open up newfeatures2001.txt that is in your graal folder, and search "triggeraction" |
thanks that helped i understand now thanks everybody.
|
:D
|
| All times are GMT +2. The time now is 09:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.