![]() |
Sword System
I need help on making a sword system similiar to Shaded Legends (If they still have it) and maybe Kingdoms to.
|
Quote:
|
To make the moviments etc..
usually use setani,replaceani. and Quote:
|
Quote:
Also thank you osrs to for help. |
I found a good example at NewFeatures:
triggeraction targetx,targety,action,params; This is one of the commands that give you like 50% more scripting power than before. It is like a combination of hitobjects and callnpc, but better. With 'triggeraction' you invoke an event to the object on positon (targetx,targety). If the object is an npc, then the npc script is called with the flag 'action<action>' set, when the object is a player then the weapon scripts of the that player are called with the 'action<action>' flag set. 'params' can be one or more parameters, divided by commas; the called script can read the paramters by accessing the message code #p(paramindex). Because this is hard to explain with words, here some little examples: Quote:
Both players must have this weapon for making it working. Then use it on the other player, and he will be freezed, because a 'freeze' action is sent to him and his weapon script, called with flag 'actionfreeze', will freeze him. You can also move the if (actionfreeze) ... into an system npc so the weapon can be used on all players. |
I'll try to explain it as simple as possible
Ok, The actual sword part is really simple. Just a basic NPCW(weapon) that sends a triggeraction (I believe someone already posted what triggeraction is) that sends parameters to the NPC-Server. The parameters can (and should) be the X and Y where the sword hit is, also the player who swung the swords accountname, index, or ID would be a good thing. You can add other things for more options and such later. After you do that you need some kind of System to handle the triggered actions serverside. This can be a NPCW also. It will recieve the actions and handle them appriopriatly. Such as finding out if a player is in the coordinates passed in the parameter. If there isn't then nothing will happen (unless, ofcourse, you want something to happen. Such as saying "MISSED!"), but if there is a player in the given coordinates then you can then cause damage to the player however you see fit. I tried to make this simple, if you have questions just talk to me on AIM or through forum PM |
Quote:
|
Quote:
|
2+2 is 4 stupid. I didn't get the clarity and stuff. Also I know what coordinates are.
|
Quote:
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 06:02 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.