• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Producer Update: Natives List

Status
Not open for further replies.
Level 2
Joined
Sep 25, 2013
Messages
7
I would like to offer add the following functions and make the following changes that improve life of mapmakers :)

1. Make it possible to add custom attack/armor types like in SC2. Custom hero stats as well. Maybe new tab in Object Editor?

2. Some new events:
JASS:
constant unitevent EVENT_UNIT_BASH //event triggers when Bash chance occurs. Helps to make passives that trigger on attack way easier.
constant unitevent EVENT_UNIT_CRITICAL //event triggers when Critical Strike chance occurs. Same as one above.
constant unitevent EVENT_UNIT_UNLOADED //triggers when unit unloading
constant unitevent EVENT_UNIT_LIGHTNING_DAMAGE //triggers when deal damage by Chain/Forked Lightning and Healing Wave

(also, if you add bonus damage to crit. ability, it doesnt add up with the number in the floating text)

3. Fix Hero and Divine armor type icons - they do not have upgradeable counterparts

4. Some new functions:
JASS:
function UnitAddChanceAbility takes unit u, integer abilid, real chance returns nothing //adds unit an ability that triggers when it attacks (aka toggleable orb passive without the orb)

5. Add orders for item abilities so they can be issued to cast with triggers.

6. Rewamp Archimonde’s Rain of Fire to work diffirently and not only with part of summon spells. (aka an ability to put in Flamestrike so it casts multiple Flamestrikes)

7. Allow to add more lightning types than currently supported (maybe allow their custom coloration as well). Another tab in Object Editor?

8.
JASS:
function AddLightningUnitToPoint takes string codename, boolean checkVisibility, unit u, real x, real y returns lightning //Bounds a unit and a point with a lightning (when unit moves effect is attached)
function AddLightningUnitToUnit takes string codename, boolean checkVisibility, unit u1, unit u2 returns lightning //Bounds two units with a lightning effect (attached to both, even when they move)

9. Allow to hide floating text of abilities like Evade, Shadow Strike, Critical Strike and Mana Burn with a flag in Object Editor.

10.
JASS:
function UnitSetAbilityTooltip takes unit u, integer abilid, string tooltip returns nothing //Changes ability tooltip

11. Allows to add an argument that can be changed and that depends on certain values in ability tooltips.

Like so: Deals $1 damage to the targeted unit.

JASS:
function SetUnitTooltipAbilityArgument takes unit u, integer abilid, integer param, string value returns nothing
Changes $argument to be equal of value. E.g:
JASS:
call SetUnitTooltipAbilityStats(u,’A000’,1,I2S(GetHeroAgi())
The "1" number means first argument in tooltip ($1)
where $1 equals hero’s Agility. etc

12. Increase the amount of text that you can put in a tooltip.

13. Some function for AI scripts:
JASS:
function MorphUnit takes integer qty, integer id returns boolean //Morph qty units of type id for AI
function GetRandomAIUnit takes integer id returns unit //Gets a random unit controlled by AI
function IssueUnitHireHero takes integer id returns nothing //Orders a random unit controlled by AI to hire a unit from Mercenary Camp/Goblin Laboratory/etc
function IssueUnitHireUnit takes integer id returns nothing //Same as one above but to hire a hero from a Tavern.
function IssueHeroBuyItem takes integer hero_id, integer item_id returns nothing //Orders a random hero of hero_id type to purchase an item of item_id type from any shop (including neutral)

14.
JASS:
function UnitAddEnergyBar takes unit u, integer res_start, integer res_max, integer res_regen integer color_red, integer color_green, integer color_blue //Unit gains an energy bar, its text color can be changed. You can make abilities to use custom energy instead of mana (like Rage or Energy in WoW). Does not count as mana (unaffected by brilliance aura, fountain of mana, etc)

15.
JASS:
function SetLocalCursorFlicking takes boolean on returns nothing //Enables/disables cursor flicking (change of color) (see next)
function SetLocalCursorFlickingOnTarget takes boolean on, string error returns nothing //Enables/disables cursor flicking when casting an ability (for spells based on Channel)
function SetLocalCursorOnTargetError takes string error returns nothing //When cursor flicking is disabled, show error string and not issue an order
function SetLocalCursorColor takes integer red, integer green, integer blue returns nothing //Sets a custom coloration for players cursor
function SetLocalCursorModel takes string model returns nothing //Changes cursor’s model

16. Add a flag for abilities in Object Editor to make them unable to be silenced. For Example, Ensnare is not affected by Silence.
Add flags for Silence, Drunken Haze and Cloud of Fog to allow them to disable passive abilities and items (either fully or partially, like Doom).
Another solution - when creating a spell with silence, allow players to list spells that are unaffected by this spell.

17.
JASS:
function GetUnitAbilityList takes unit u returns integer array //Gets a list of unit abilities as array
Or add another variable - abilitylist (array of abilities).
In that case, required functions are:
JASS:
function GetUnitAbilityList takes unit u returns abilitylist //returns a list of the unit's abilities
function GetAbilityListLength takes abilitylist l returns integer //returns the size of the unit's abilities list
function GetAbilityFromAbilityList takes abilitylist l, integer id returns integer //returns rawcode of the ability at number id

18. Fix the custom text on pre-game menu (custom names of races and AIs shows only after you play a map and it shows on all the other maps as well).
Allow to add additional races. Can be achieved by using config (for JASS users) or make it fully supported in WE.

19. Fix and extend or at least allow to add new team colors (at least through using colors of players 13+) or allow to customize team colors using RGB system.

20. Add a new type of agents in-game that work like effects but that are instead moved from point to point until a required event happens after which they get destroyed..
JASS:
type missile extends agent //New variable type - missile
type missileevent extends eventid //New event type for missiles
constant unitevent EVENT_UNIT_MISSILE //Event of missile hitting a unit
constant missileevent EVENT_MISSILE_IMPACT //Even of missile reaching a point
function CreateMissileOnUnitToUnit takes unit target, unit source, real height, real speed, real arcangle, real scale, string modelpath returns missile //Creates a missile that moves from one point to another. Upon impact triggers EVENT_UNIT_MISSILE.
function CreateMissileOnPointToUnit takes unit source, unit target, real x, real y, real height, real speed, real arcangle, real scale, string modelpath returns missile //Like one above but from point to unit
function CreateMissileOnPointToPoint takes unit source, real x1, real y1, real x2, real y2, real height, real speed, real arcangle, real scale, string modelpath returns missile //Like ones above but from point to point. Upon impact triggers EVENT_MISSILE_IMPACT.
function SetMissileX takes missile m, real x returns nothing //Sets X coordinate of missile
function SetMissileY takes missile m, real y returns nothing //Sets Y coordinate of missile
function SetMissileHeight takes missile m, real height returns nothing //Sets height of missile
function SetMissileTargetPoint takes missile m, real x, real y returns nothing //Sets the target that missile will move at
function SetMissileTargetUnit takes missile m, unit u returns nothing //Missile will move to targeted unit
function SetMissileSourceUnit takes missile m, unit u returns nothing //Detects a unit that spawned missile
function SetMissileSpeed takes missile m, real speed returns nothing //Sets missile speed
function SetMissileScale takes missile m, real scale returns nothing //Sets missile size
function SetMissileArcAngle takes missile m, real angle returns nothing //Sets missile arcangle
function SetMissileModel takes missile m, string path returns nothing //Sets missile model
function GetEventMissile takes nothing returns missile //Returns a missile that reached its target
function GetMissileX takes missile m returns real //Returns current X of a missile
function GetMissileY takes missile m returns real //Returns current Y of a missile
function GetMissileHeight takes missile m returns real //Returns current height of a missile
function GetMissileSpeed takes missile m returns real //Returns current speed of a missile
function GetMissileScale takes missile m returns real //Returns current size of a missile
function GetMissileArcAngle takes missile m returns real //Returns current arcangle of a missile
function RemoveMissile takes missile m, boolean animation returns nothing //Deletes a missile. Flag animation depends if it will play death animation or not
Speculations about missile functional are open.

21. Allow to customize command icons for each race (move, stop, hold, attack and etc. like building icon) by using functions or using method from WC3 Beta

22. Allow to add additional custom resource(s) to gold and lumber (or at least give us back mana stones pls)

23. Allow/upgrade/extend functional of hidden abilities (world requires to know what ‘Spy’ is doing!, Random Item to work only with items that have ‘morphable’ flag at ‘on’)

24.
JASS:
function SetUnitSelectionCircle takes unit u, string modelpath returns nothing //Sets a selection circle model for a unit
function ResetUnitSelectionCircle takes unit u returns nothing //Returns the original selection circle of the unit

P.S. Source idea, the rest is there

25. Allow "Charge Gold and Lumber" to be customized like Channel (so custom spells that cost resources instead of mana can be added)

26. Fix impact effect of spells based on Stampede and Carrion Swarm/Crushing Wave (it isnt changing when setting any other effect, it follows the one that original spell possesses)
 
Last edited:
Level 14
Joined
Jan 16, 2009
Messages
716
@WGPavell
Thank you for your input :)
I have made some comments regarding your propositions.

2: BASH, CRITICAL and LIGHTNING are too specific. It should be something that would work for all spells. In a sense BASH and CRITICAL have the same logic.
4: this can be easily done using a Damage Detection System
5: This can be already done from what I know. You should just make a trigger that display any order issued and you will catch the order used by items. Even for such things as moving an item to another slot.
6: This can be easily triggered.
7: This can be done too: check this out.
8: This can be easily triggered with a periodic loop.
10: This has already been proposed by everyone, I think we might get it if it's not too hard to do for Blizzard.
11: seems useless if you have 10.
14: I am getting what you want to do (alternate resource system) but it won't be made with just one function. What you want is actually really complicated. You would need to rework the whole warcarft 3 spell system to be able to work with multiple hero resources. It is clear that the game was built to only use mana.
17: First you would need to add a list type. Jass functions can't return nor take integer array as of right now.
18: Additionally, the game should clear its cache a lot better. for instance, a custom font will appear on other maps too. Sometimes it may causes the map to crash because of collisions.
 
Level 1
Joined
Apr 16, 2017
Messages
1
And how about adding an event if the "spellbook" is open, and it is also possible to change positions within the "spellbook"

PS wrote through Google translator xD

constant unitevent EVENT_UNIT_ABILITY_OPEN
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
And how about adding an event if the "spellbook" is open, and it is also possible to change positions within the "spellbook"
Not possible as all that is managed locally. Other clients are not aware of current command card state. If it is synchronized it will increase net traffic as well as fire the even off with some network based latency.
 
Level 5
Joined
Dec 6, 2009
Messages
79
Better array API, possibly a dynamic array type, with common functions like ArrayAdd, ArrayLength, ArrayRemove.
Separate type is probably not really feasible because it would need to support generic/template types, but if structs are implemented maybe some simple form of template types could be implemented as well?
Original arrays have this weird element limit and require keeping their "length" somewhere, this is not good.
At least the element limit itself has to go.

An ability to declare locals anywhere would be very good.

Multi pass compiler - an ability to declare functions past the point they are used.

If structs are added I would suggest not adding any form of OOP, but rather adding proper typed function pointers (currently we have code, I'm not sure if we can even do anything with it other than pass it into other functions) which would allow creating vtables and whatnot in userland.
 
Last edited:
Here are some of my suggestions. I will likely post more as time goes on.

Models

Dynamically change the path of replaceable textures for widgets.

JASS:
native SetWidgetTexure takes widget whichWidget, string texturePath, integer replaceableId returns boolean
Models can have textures with a Replaceable ID instead of a texture path. The most common use of this is for team color and hero glow (Replaceable ID 1 & 2). While there are natives to set a units team color, that's about all that is natively supported. The Mountain Giant's War Club ability will change any texture on the caster that uses "Replaceable ID 32" to the texture of the targeted destructable. While this allows us to modify ID 32, it's not enough and has some overhead.

If we can allow the user to change any ID, then we can switch the texture of any part of the model dynamically. Of course this requires models to use Replaceable ID's instead of texture paths, so many vanilla models won't have uses other than custom team colors. Perhaps a complete API to modify model data would be better, however this would be the easiest to implement.

There is already an internal function capable of doing this. However it requires a destructable as one of the paramaters, but I think it should be fairly easy to find a way to not require one. The way I do it is by using a dummy destructable object (not handle) and switching it's texture, but there is probably a better way.

1.26
game.dll + 0x4D32E0

1.28.5
game.dll + 0x1D74F0

(thanks to @MindWorX for originally finding it on 1.28.5 for me)

Syncing

  1. SyncStoredString doesn't work.
  2. Create a IsPlayerSyncing native which will check if a player is still syncing gamecache data (if none are, data is safe).
  3. Add sync natives for the hashtable type, or create a new type specifically for syncing.

Interface

  1. Allow us to write text to more than just the game text (field03EC of CGameUI). We should be able to write to our own error messages like SimError (this library has drawbacks/doesn't work perfectly).
  2. Draw images & models on screen.
  3. GetResolutionX/Y.
  4. Possibly allow imported framedef files in maps to work (could mess things up after map is over).
  5. Allow us to move/modify frames in-game.
  6. native EnableCheats takes boolean flag returns nothing (game.dll + 0x1C97E0 on 1.28.5).

And the mouse/interface API from Custom JASS Natives - (Requests & Submissions)

Of course GetMouseX/Y functions would likely have to be async, but we could have events for clicks and it would be no different from the camera natives being async.

And with the sync natives we can have some use in syncing mouse positions sparingly.

Files

  1. For backwards compatibility keep everything related to the Preload bug (generating and reading files in CustomMapData folder).
  2. Allow Preloader to work for the CustomMapData folder even if the "Allow Local Files" registry flag is not set.
  3. A proper API that allows storing and retrieving data to/from disk in multiplayer. One way might be to not wipe game cache data in multiplayer. Another would be IO natives that are restricted to the CustomMapData folder.
 
Last edited:
Level 14
Joined
Jan 16, 2009
Messages
716
Unless I am missing something, pausing a unit shouldn't affect its pathing.

JASS:
native PauseUnit takes unit whichUnit, boolean flag returns nothing
/*
This forces a unit to have a collision until it's unpaused.
Pausing a unit with a disabled collision will re-enable it for this unit.
Trying to disable the collision of a paused unit doesn't work.

This has been tested with the SetUnitPathing native and abilities that affect collision such as 'Aeth'*/
native SetUnitPathing takes unit whichUnit, boolean flag returns nothing
*/
 
Level 4
Joined
Jul 2, 2014
Messages
46
Anyone mentioned web requests?

The idea would be allowing host (I've read "GetLocalPlayer() == Player(-1)" to exec code only on host) to communicate over HTTP requests to recover persistent datas online.

Right now I only think of save/load system; implementation could be such as :

First, upon starting Warcraft, create an unique identifier (call it token, id, whatever), this will be used later.

As for functions, I think it could be defined as:

JASS:
native WebRequestGet takes string uri returns string
native WebRequestPost takes string uri, string parameters returns string

As for now, returns would be strings, meaning one would have to process it to extract data if format is not text.
The asynchronous state of the functions could be problematic, would it be possible to pass string variable to the function as pointer and check for it's content to be != empty string, once it's filled with data, consider the request as done?

That would mean:

JASS:
native WebRequestGet takes string uri, string* response returns nothing
native WebRequestPost takes string uri, string parameters, string* response returns nothing

For mod uses, one would have 2 triggers, one issuing the request on events (player types "-load"), one with periodic timer checking for the "string* response" to be != empty string.
Ideally, only host would do the requests, to avoid multiple identical requests; then, on response, the variable would be filled and sync across other players.

Edit: unique identifier would be sent every request as his current in-game username, period.
Point is to identify who is asking and be able to implement, for instance, a codeless, name sensitive, identifier sensitive save/load system.

As "name:blufflegendaire+identifier:2028AZ" would be an unique pair, allowing people to share aliases/names and yet not overlapping over saves.
 
@blufflegendaire I doubt Blizzard will allow us to communicate to outside websites.

What makes more sense is if Blizzard does it how they already do in China (netease), and provide a JASS API that allows you to store data in a key/value system for your map on official servers. Then, Blizzard could make a web API to make that data retrievable.

These are the natives they use in China which allow users to load characters without typing a code. There are others which allow you to create your own ladder rankings, and you can even display some of this data in the game lobby before the match starts.

JASS:
native DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns boolean
native DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
However if Blizz decides to implement HTTP requests I propose it works like this.
 
Last edited:
Level 5
Joined
Dec 6, 2009
Messages
79
Why would you do it like that? Wouldn't it be simply saner to pass a code reference like all asynchronous functions already do?
Web requests are important for stuff like keeping stats, just look at how much stuff came from being able to execute code in dota 2 custom games. Whole stat libraries and website helping creators track their games and balance them. I think everyone wants to know how much their game is actually being played.
 
Why would you do it like that? Wouldn't it be simply saner to pass a code reference like all asynchronous functions already do?

Yeah that would make more sense.

JASS:
native TriggerRegisterWebResponseEvent takes trigger whichTrigger, string uri, string headers returns nothing
native GetEventWebResponse takes nothing returns string
Web requests are important for stuff like keeping stats, just look at how much stuff came from being able to execute code in dota 2 custom games. Whole stat libraries and website helping creators track their games and balance them. I think everyone wants to know how much their game is actually being played.

Yeah but like I said in the previous post, if Blizzard did it how they are already doing it in China, all of what you're saying would be possible.

Web requests from JASS could be used to DDOS or who knows what else. It just seems like more of a hassle to implement safely.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
The idea would be allowing host (I've read "GetLocalPlayer() == Player(-1)" to exec code only on host) to communicate over HTTP requests to recover persistent datas online.
The host cannot execute JASS. It is a coordination server.
What makes more sense is if Blizzard does it how they already do in China (netease), and provide a JASS API that allows you to store data in a key/value system for your map on official servers.
So this native already exists in the Chinese install of WC3? Please elaborate.

If it was recently added to China patches of WC3 then it will soon be added to the rest of the world. Be aware that a lot of Asia uses third party mods of WC3 which might have unofficially changed the available JASS natives.

This is the first time I am hearing of this which is why I am sceptical. Such features usually make the front news page of THW when they are released.
 
So this native already exists in the Chinese install of WC3? Please elaborate.

If it was recently added to China patches of WC3 then it will soon be added to the rest of the world. Be aware that a lot of Asia uses third party mods of WC3 which might have unofficially changed the available JASS natives.

This is the first time I am hearing of this which is why I am sceptical. Such features usually make the front news page of THW when they are released.

Chinese players don't use Battle.net and have their own platform (netease). This platform provides the extra natives for people who use it, and it has been around for some time now.

首页-魔兽争霸官方对战平台
 
  • Like
Reactions: pyf

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,495
We have added a large number of natives for 1.29.0. I'll update here when we have a final list.

I will then work with you all to make part two based on what was added and what you still need.
RHEVkn
 
^^

*Shed tears of joy and sadness*
(No more damage detection systems :( )

(Yes to dynamic object data! :) )

Well, I only remembered that the damage event is on the moment before damage. Detection of actual damage events are not really going to be affected. (I feel the sadness of having a cherished, polished, well-rounded code specifically for damage detection being reduced to just detecting after-damage events, but that's just me)
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,495
^^



Well, I only remembered that the damage event is on the moment before damage. Detection of actual damage events are not really going to be affected. (I feel the sadness of having a cherished, polished, well-rounded code specifically for damage detection being reduced to just detecting after-damage events, but that's just me)
Wait, what are you talking about?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
Don't expect all the natives please, but there are quite a few. =)
We understand. Without knowing how WC3 works it is hard to make suggestions that are sensible/viable to implement.

Personally I would be ecstatic just to be able to use triggers to modify unit properties like maximum life/mana, regeneration, attack damage, etc. The lack of such functionality has greatly affected/limited map developers for a very long time.

I would even settle for just having the local declared local handle variable reference counter leak on return bug fixed. That would mean no more annoying "set u = null" at the end of functions.
 
Level 4
Joined
May 8, 2016
Messages
58
I need an event which triggers at buff application/expiration, ability to apply buffs directly (permanent and timed), ability to get/set buff's tooltips and level, ability to get/set buff fields regarding attachment models and attachment points.
vJASS:
gameevent EVENT_UNIT_BUFF_APPLIED
gameevent EVENT_UNIT_BUFF_EXPIRED //Triggers when buff expires or gets removed

GetEventBuffApplied takes nothing returns integer //Returns buff's code/type/whatever
GetEventBuffExpired takes nothing returns integer //GetUnitBuffLevel must remain responsible at the same thread

function UnitApplyBuff takes unit u, integer buffId, real time, boolean permanent returns nothing //Applies specified buff for specified time period. If "permanent" flag is checked, ignores the timeout and sets buff permanent
function UnitRemoveBuff takes unit u, integer buffId returns nothing
function IsUnitBuffPermanent takes unit u, integer buffId returns boolean //Returns true if specified buff is permanent.

function SetUnitBuffTimeout takes unit u, integer buffId, real timeout returns nothing //Makes already existing buff timed
function GetUnitBuffTimeout takes unit u, integer buffId returns real //Returns buff's timeout either default or which was set by UnitApplyBuffConstant or SetUnitBuffTimeout.
function GetUnitBuffElapsed takes unit u, integer buffId returns real //Returns buff's elapsed time regarding timeout either default or which was set by UnitApplyBuffConstant or SetUnitBuffTimeout.
function GetUnitBuffRemaining takes unit u, integer buffId returns real //Returns buff's remaining time regarding timeout either default or which was set by UnitApplyBuffConstant or SetUnitBuffTimeout.

function SetUnitBuffLevel takes unit u, integer buffId, integer level returns nothing
function GetUnitBuffLevel takes unit u, integer buffId returns integer

function SetUnitBuffTooltip takes unit u, integer buffId, string tooltip returns nothing
function GetUnitBuffTooltip takes unit u, integer buffId returns string
Can someone explain to me what is the difference between ApplySpellEffect and ApplySpellEffectPoint and why the last one takes that much parameters if all we need are x and y.
 
Last edited:
Casting abilities independent of a unit can be tricky to pull off, so applying buff via triggers might be hard to so. It would be neat to have though.

The idea behind ApplySpellEffect is similar to Immediate/Point/Target orders. Eg:

ApplySpellEffect are for spells like Thunderclap, Roar, Taunt, etc
ApplySpellEffectPoint are for spells like Carrion Swarm, Earthquake, Blizzard, Pocket Factory, etc, aka any spell that has a direction.

I guess something like Blizzard technically has no direction, but it is a point-target spell. ApplySpellEffect is also potentially just part of ApplySpellEffectPoint and not needed (eg you leave the xcast and ycast arguments as 0 and only use the xtarget and ytarget), but I figured I'd include it just in case.

The whole idea behind applying spells without a caster needs to be explored more. Any feedback and suggestions on how this can be achieved would be welcome.
 
Level 4
Joined
May 8, 2016
Messages
58
Indeed. I forgot. Second point is required for spells affected by caster's position. Here's my idea then.
vJASS:
function ApplySpellEffectPoint takes integer abilcode, unit caster, real x, real y, boolean emitCast returns nothing
function ApplySpellEffectTarget takes integer abilcode, unit caster, unit target, boolean emitCast returns nothing
//emitCast boolean makes it so that caster behaves like he's an actual caster (gets the proper order/animation, gets his mana drained, etc)

Caster is required anyway. All those functions don't run if spell can't be applied (because of allowed targets or spell base) or caster == null.
 
Last edited:
Level 4
Joined
May 8, 2016
Messages
58
I need an ability to modify the damage before it gets applied.
vJASS:
   function SetEventDamage takes real newValue returns nothing
   //This should rewrite the damage for an event

This should be handy if u need to create an ability which blocks some amount or percent of damage.
 
Last edited:
I need an ability to modify the damage before it gets applied.
vJASS:
   function SetEventDamage takes real newValue returns nothing
   //This should rewrite the damage for an event

This should be handy if u need to create an ability which blocks some amount or percent of damage.

This would be most useful when you wish to block an insanely high amount of damage, and the cheat-death ability is not sufficient.
 
Level 2
Joined
Aug 10, 2016
Messages
20
I have an idea for more functions for variable "trigger". It will be cool to add and remove events, conditions and actions.
 
Level 2
Joined
Aug 10, 2016
Messages
20
One can already dynamically add and remove conditions and actions... Its only events that require the trigger object be remade.
Ops, I forgot about this, but deleting events is a problem. And what about dynamic hashtables? Deleting undeletable objects is too necessary.
 
Last edited:
Level 4
Joined
May 8, 2016
Messages
58
vJASS:
type uimodel extends handle
type uitext extends handle

function CreateUImodel takes string modelLocation, real modelWidth, real modelHeight, real screenX, real screenY, integer red, integer green, integer blue, integer transparency, integer layer returns uimodel
function CreateUIText takes string text, real letterHeight, real screenX, real screenY, integer red, integer green, integer blue, integer transparency, integer layer returns uitext

function ShowUImodel takes uimodel u, boolean flag returns nothing
function ShowUIText takes uitext u, boolean flag returns nothing

function DestroyUImodel takes uimodel u returns nothing
function DestroyUIText takes uitext u returns nothing

function SetUImodelX takes uimodel u, real x returns nothing
function SetUImodelY takes uimodel u, real y returns nothing
function GetUImodelX takes uimodel u returns real
function GetUImodelY takes uimodel u returns real

function SetUITextX takes uitext u, real x returns nothing
function SetUITextY takes uitext u, real y returns nothing
function GetUITextX takes uitext u returns real
function GetUITextY takes uitext u returns real

function SetUImodelColor takes uimodel u, real R, real G, real B, real T returns nothing
function GetUImodelR takes uimodel u returns integer
function GetUImodelG takes uimodel u returns integer
function GetUImodelB takes uimodel u returns integer
function GetUImodelT takes uimodel u returns integer

function SetUITextColor takes uitext u, real R, real G, real B, real T returns nothing
function GetUITextR takes uitext u returns integer
function GetUITextG takes uitext u returns integer
function GetUITextB takes uitext u returns integer
function GetUITextT takes uitext u returns integer

function SetUImodelWidth takes uimodel u, real w returns nothing
function SetUImodelHeight takes uimodel u, real h returns nothing
function GetUImodelWidth takes uimodel u returns real
function GetUImodelHeight takes uimodel u returns real

function SetUITextHeight takes uitext u, real h returns nothing
function GetUITextHeight takes uitext u returns real

function SetUITextText takes uitext u, string t returns nothing
function GetUITextText takes uitext u returns string

function SetUImodelmodel takes uimodel u, string modelLocation returns nothing
function GetUImodelmodel takes uimodel u returns string

function SetUImodelLayer takes uimodel u, integer h returns nothing
function GetUImodelLayer takes uimodel u returns integer

function SetUITextLayer takes uitext u, integer h returns nothing
function GetUITextLayer takes uitext u returns integer
I suppose that if u say u need such functionality, u probably can find use for yourself in gamedev.
 
Last edited:
Level 2
Joined
Aug 10, 2016
Messages
20
Also, it will be cool to make a little fix for GetUnitX, GetUnitY, because we can't get units coords when it is loaded on zeppelin (for example). Yeah, we can make a trigger in order to get a handle of this zeppelin and its coords, but it's a crutch. I hope, that this screenshot will help understand the problem.
 

Attachments

  • Снимок.PNG
    Снимок.PNG
    663.4 KB · Views: 250
Status
Not open for further replies.
Top