• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Noob in need of scripting help

Status
Not open for further replies.
Level 1
Joined
Oct 3, 2021
Messages
6
Hello ladies and gentlemen! This is my first post here! I am a noob wc3 map developer just starting out!
I need help in creating a script for a map that i am trying to bugfix
Specifically i want to limit a given item that player 11(dark green in this map) from getting more than 15 stacks of that item(Note that i am already familiar with object editor and i set the maximum number of stacks that item can get but this didn't work so i suspect i have to create a script from scratch and i am a complete noob lol)
Thanks in advance!
 
try these on for size:


 
try these on for size:


thanks Cheshire!
 
You need to go into the Gameplay Constants and turn on Inventory - Enable Item Stacking in order to take advantage of the Max Stacks field. This is only available in version 1.31+.

Note that this will allow ANY item with charges to stack.
the item in question is already stacking but i want it to not be able to stack more than 15 times! i will check the gameplay constants okay!!
 
yep i figured that!
okay i enabled the autostacking in the gameplay constants and set the maximum stats to the desired number but still no luck...the item in question will stack above the desired number still...i found a workaround by reducing the stock replenish time to 3600 seconds...that's the maximum it can't go over 3600 seconds
 
It should work as long as the item's settings are correct. Why not base the item off of something that already works? I know Healing Salve worked for me, stacking up to 6 times. Copy and paste that item and work from there.

Also, you can shift-click a field in the Object Editor in order to bypass limits like the 3600 stock duration. Additionally, you can go into the World Editor's preferences and enable "Allow negative real values..." for further control.
 
Last edited:
Status
Not open for further replies.
Back
Top