If you want to count a number of units, why don't you just use integer? Set a certain integer to the integer + 1 when the player buys a unit, instead of adding the bought unit to a unit group and then later count how many units are there in the unit group.
Change
Set UnitGroup = (Units within 512.00 of CasterLoc)
to
Set UnitGroup = (Units within 512.00 of CasterLoc) matching (Owner of (matching unit) is an Enemy of (Owner of (Triggering Unit)) Equal to True and (Matching Unit) Not Equal to (Triggering Unit))
Sorry, freehanded. Basically...
For my case, I lose the drive to make a map when I actually run out of ideas. I've already stopped mapping for at least 2 weeks lol. I think it's time to get maybe a partner, to help in map progress and also ideas.
I posted a demo map on how to make creeps respawn while ignoring the bones decay time (it's only if you want the bones decay time to be shorter than the wanted respawn time). It's made in JASS but should be easy to edit to what you want (at the top of the trigger).
Link
That means you probably don't understand or didn't read properly. The random stats will be generated when the item is created. Once it's on the floor, the stats will be fixed (and stored in a hashtable in my example). If a player picks it up, load whats stored in the hashtable and give bonus...
Because, in my map, I wanted the decay time to be much shorter than the respawn duration as well, so I wrote my own respawning system. I know it may be quite badly written, and uses a game cache (because in my map I use the same game cache to store loads of stuff). But anyways, if you ever wanna...
I think there's a way if you use some sort of item indexing system. With that kind of system, you would probably have an array of all the items that you have in your map. When a item is created, you can generate a random stat based on what you want.
It would be far more easier to make it...
Actually, I may know why it does not respawn for you. I've see the same problem in my map before. If your "wait" duration is longer than your "bone decay" duration in your gameplay constants, your respawn will not work, if you used wait. Triggering unit works after waits, but it does not work if...
What I did for 1 of the custom spells I made was (a Breath of Fire that destroys trees in an arc infront), I do a left limit and right limit angle (facing of caster -75 or something = left limit, +75 = right limit). Then I get units within the wanted range, and check that the angle from caster...
Why don't you just use: Unit starts effect of an ability, if Ability being cast equal to your_custom_slow, create a dummy with the polymorph ability, order it to cast on the target unit of ability cast?
I am not really good at vJass so, should those methods be in the struct? I don't know, I thought structs only contain the variables that it should have. Please correct me if I am wrong.
???? I know I can replace the TRIGSTR with my messages, the problem is, I can't remember exactly the colour codes, the text etc. I thought maybe there's a way to retrieve those internally stored strings, that would save much of my time. Well, actually just forget about this, it's nothing serious.
Obviously I know what I am doing, I converted it to JASS to make improvements, or to add more complicated stuff without having to search for functions for every single thing. Especially math, it's really pain in the arse to do math in GUI.
Okay, when you type in something as a string in a GUI trigger, example you typed "Hello" to be displayed as a message to players in game, the WE actually stores this "Hello" into an internal string. When you convert your GUI trigger to JASS, this "Hello" would not be shown, something like...
Sadly, the truth is yes. I faced this problem before as well, and I thought the damage unit function wasn't functioning in my map. But the fact is the damage function doesn't work if you use triggering unit or target unit of ability, not even in JASS. I had to store the corresponding units in...
I thought he wanted it chance based? Like maybe 10% chance to get hexed every second?
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempInt = Random integer between 1 and 100
if-then-else
if
TempInt Less than or equal to 10
then
Set...