DestructableTypeId - easiest way to get?

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
How can you find out the TypeId?
I cannot find it in WE
 
I

IKilledKEnny

Guest
Code:
(Destructible-type of (Last created destructible)) Equal to Summer Tree Wall

Or

Code:
native GetDestructableTypeId takes destructable d returns integer
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
Code:
(Destructible-type of (Last created destructible)) Equal to Summer Tree Wall

Or

Code:
native GetDestructableTypeId takes destructable d returns integer

Asked for the ID
I know about the native :s


I asked about the easiest way.
Is showing the ID by sending a message in-game the only way to get a crappy ID?
Or is it displayed somewhere in WE?
 
I

IKilledKEnny

Guest
Then I don't understand what you want. Do you want the Id of a unit-type (Peasant's is 'hpea' for example). Explain yourself better please.
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
native GetDestructableTypeId takes destructable d returns integer

The TypeID of a Destructable is, as you can see, an integer like 1230268210
 
I

IKilledKEnny

Guest
Id integers in World Editor are presnted like this:

'4 integer and letters here'

Thus when pressing ctrl+d you get the Id. Integer is a confusing name for Id as they are made from letters as well but World Editor counts them as integers.
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
ITg2 is the same like 1230268210

both is the ID for IceCrownGate, but if you want for example to create a Destructable

native CreateDestructableZ takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable


objectid is an integer :s


How can i convert this string to an integer?
 

SFilip

Gone but not forgotten
Reaction score
633
> World Editor counts them as integers
It converts (calculates) them into integers.
'A000' = 'A'*256^3+'0'*256^2+'0'*256^1+'0'*256^0
'A' would be the number for A in the ASCII table.

So 'A000' should be the same as using 1093677104 for instance.
In other words all you need to do is to put the ID from the object editor (the four letters/numbers) inside ' ' and WE will see it as an integer.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Ctrl+D is showing object IDs.
They may look like 'AB12', but they still are integers...

> ITg2 is the same like 1230268210

In that case, writing either 1230268210 or 'ITg2' is just the same.
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
Ahhh it was so confusing, I just forgot about that.
Thanks for help

Edit: lal sry Kenny bit late and i am lookin tv
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top