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

Ok, how do I get primitive ids

Status
Not open for further replies.
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,258
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