• 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.

Question about uploading GUI spells?

Status
Not open for further replies.
You can use the custom value of units as an indexing as long you aren't modifying them. Bribe made a spell template using this method here: Unit Indexer Spell Template.

Unit indexers are the only submissions allowed in the spell section to modify a unit's custom value.

It is more safer and cleaner than Custom Unit value.
Unit indexers directly modify the custom value of units. I'm not sure what you mean by this statement.
 
Level 6
Joined
Feb 5, 2012
Messages
1,685
You can use the custom value of units as an indexing as long you aren't modifying them. Bribe made a spell template using this method here: Unit Indexer Spell Template.

Unit indexers are the only submissions allowed in the spell section to modify a unit's custom value.


Unit indexers directly modify the custom value of units. I'm not sure what you mean by this statement.

Oh I mean Unit Indexer is atleast much more safer in handling Custom Values and also it recycle the index which makes it clean.

Am I wrong?
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,241
Simply put : Custom Values are not allowed, except to use alongside Unit Indexer (which means no "Set Unit Custom Value" in your triggers)

This.

Which is an really odd rule from my point of view.
It's like saying you're now allowed to rob banks - unless you're using a gun to rob with.

Semi-serious jokes aside, it'd generally be bad method to use custom value of unit anyway.
 
Last edited:

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
Under no circumstances can a resource modify Unit User Data (Custom value) with the exception of Unit Indexing systems.
Is it using a proper grammar? With my current English knowledge, I can't even translate it correctly. It really sounds to me like, when you don't use unit indexer you may modify unit user data as you like, and vice versa.
 
Level 18
Joined
May 11, 2012
Messages
2,108
A resource can/may not modify User Unit Data (Custom Value) under no circumstances, with the exception of Unit Indexing systems.

Better now? "under no circumstances", there might be a better fitting word instead of "no", but this should be good.
 
Map makers can do what they want with UnitUserData (custom value). However, Spells/Systems need to not meddle with it due to cross-resource compatibility.

Ie. Spell "A" set's caster's custom value to 7, spell "B" sets it to 42.

The correct solution is to use a Unit Indexer as it uses a custom value that acts as an Array Index, so instead of "Unit - Set Custom Value to 7" you use "Set CustomIntegerArray[(Custom value of Unit)] = 7
 
Status
Not open for further replies.
Top