Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Can someone make me a spell like that used to make hero use only one weapon or shield? Because when I tried to download the one in the SPELLS section nothing happend. Please tell me why doesn't it download the spell.
Asking for one to be made is the request fourm job I think. . .
This is for help making spells.
A weapon system is about the easiest thing to make. . .
There are 2 Ways you can make one.
The Cube Method
You make 2 integer arrays and you store the shield items handle nums in one and weapons in the other.
Additonal ones can be added for more types.
You need to make it so that when a hero picks up an item it runs a check system for both the armor and weapon.
The check system loops for each item slot a hero has checking if the item carried by it is contained in the variable.
The reason this is called (more like I called it) the Cube Method is that is the way it works is simlar to finding the area of a cube it can also be reffered to as a 3D item system method.
If we had 25 in 3 catergies it would work like this.
3*6*25 Which means it will search for items 450 times.
There are many ups and downs to this method.
+ Easy to make
+ Easy to modify
+ Vitualy unlimated item capicity
- With lots of items will cause HORIABLE lag.
+ Unlike most systems seen in MP maps will not bug as much
- No support of class only items without going into a 4D system resulting in more lag
- No support of level restriced items without going into a 4D+ system resulting in even worse lag
The SMART method
You store every item in a gamecahe with a string under the items handle integer.
You then make a string encoder that can make a string system like ill show below.
You can retrieve the string by simply geting the item type integer and fetching the string from the game chache then running the string through a decoder and calling the corosponding actions.
When a unit picks up an item it will loop threw the inventory and if it finds 2 weapons one will be dropped.
Hers an example of the string you could store with the items.
WA005L
The W could stand for weapon the A for archer class only the 005 for level usuable and the L for what pioroity to drop if there are 2 weapons.
There are many ups and downs to this method.
- VERY hard to make for beginners
+ Supports vitualy anything imaginable from an inventory system.
- Might lag if you over do it
+ Good reliable system that will not bug easily.
Thses are a rough guid line how to go about making an item system.
If you are interested in any of the above just say and ill tell you what to do in more detial.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.