![]() |
How to handle custom swords
The thread title says it all.
I'm nearly done with my custom Item system and Inventory, but I'm still not sure how to handle custom swords. I was thinking that I could maybe add a weapon to the player, that is called like the sword with a "-" in front of it , eg "-Sword of Doom" :D, and that has a script that reacts to the Button S, and take that weapon away when another sword is equipped. But that seems awfully complicated. I'm sure you guys have probably thought of a much better way to do it. So which way should I do it? |
Use one weapon script that handles all possible swords I guess? I'm not sure I understand the question.
|
Like Maui said, you'd be better off using a single wNPC to handle the said equiping/inventory system, and have a database NPC to store/use all informations about each sword.
Using a wNPC for each sword is way too messy imo. You could have custom variables with of course a sword attribute in your ganis. With a well organized template, manipulating the weapon's img using the weapon's name is much better, which is what most servers do. The rest should be a piece of cake next :) |
My suggestion:
One database NPC named, say, Swords, formatted like so: PHP Code:
PHP Code:
(anyone ever realize what a weird word "sword" is?) |
Quote:
It's better than Sharp Metal Stick. |
Thanks cbk1994! I'll do it that way when I get to it.
Right now I'm doing the HUD first. http://img28.imageshack.us/img28/787...1295713158.png Man, I forgot how much fun Graal coul be! |
Your char seems really out of place with the rest of your graphics.
|
Quote:
You know, I don't care. I'm doing this for me, for fun. Because I always loved Graal (Graal 1.4 got me hooked, when there was offline multiplayer for up to 4 players, I would always make fun levels for me and my friends to play on with gamepads). I don't hire anyone, I don't hog this forum with posts about my server. It will probably never be a full-on playable server, but that's not what I'm aiming for. The way is the goal. The 50€ for 6 months Developers Gold are well spent, if you think about how short games that cost 10€ more are nowadays and the amount of time you can have with playing around on your server. Maybe I could make custom bodies, but that's a pain in the ass. :D |
Quote:
|
Quote:
But the other day I have been reading a few threads in this forum, and don't get me wrong, the scripting community is great and has been very helpful to me, but the attitude of some people in this forum is horrible. A lot of newbies get ridiculed, there is a lot of nagging, and people who rent servers are frowned upon because why would you rent a server? My post above is why. |
Quote:
|
My method to handling is a tad different. I use -sword system which handles slicing/charging/spining/updating tiles, but I have individual sword weapons. When a player selects a sword I trigger a function serverside of the sword weapon which handles the stat modifiers and sets a clientr val with the sword name/sword image/inventory position. When player selects another sword I find the sword the player has by a clientr value I set, then after it returns the mods to normal then update the clientr val and then trigger the mods in the new sword.
|
Quote:
These are the echoes: HTML Code:
trigger1 in -Inventoryweapon -SWeapons: PHP Code:
PHP Code:
|
Odd, I thought link worked like that.
This ought to work: PHP Code:
|
| All times are GMT +2. The time now is 01:31 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.