• 🏆 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!

Ok, how do I get primitive ids

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
native doodad DoodadFromId (int id);
native unit UnitFromId (int id);
native region RegionFromId (int id);
native unitgroup UnitGroupFromId (int id);
native camerainfo CameraInfoFromId (int id);
native point PointFromId (int id);

If I can't, I guess SC2 isn't ready for modding yet as the map I wanna do is completely impossible without being able to convert region to integer.

edit
looked through all of the natives and there is no way to get the above ids... another epic fail by Blizzard?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
The ids are generated by the GUI system SC2E uses. Unlike WarCraft III which generates some script for every pre-defined region made, StarCraft II instead generates an Id representing it. You can then access that pre-defined region object by calling the RegionFromId function.

The same applies for all those types as you can declare them using the editor GUI. This solves the age old problem that WarCraft III had of trying to position active sites for triggers on a map when using JASS.

I do not think they can return regions that were created by trigger script during a session. Think of them as a way to map to constants rather than I2H like functions.

If I can't, I guess SC2 isn't ready for modding yet as the map I wanna do is completely impossible without being able to convert region to integer.
Are you sure it is completly impossible? There are many ways to program things, even if some are less efficient than others.

looked through all of the natives and there is no way to get the above ids... another epic fail by Blizzard?
Or maybe you are using it wrong?

Try posting the idea you had in mind. Perhapse people might know of features supported by SC2 that can help you implement it.
 
Status
Not open for further replies.
Top