Jump to content

Flags in itemtype.txt


Recommended Posts

...
FLAG_HAS_WORLDOBJECT_RS = 16777216;
FLAG_CLICKTHROUGH = 33554432;
FLAG_EXCLUDEFROMNAVIGEN = 67108864;
FLAG_NO_ANIM_OPTIMIZATION = 134217728;

local newItemType = {}
---------------------------------------------------------------------
-- Itemtypes
---------------------------------------------------------------------
newItemType = {
	-- standard info
	renderfamily = "RENDERFAM_CREATURE",
	family       = "FAMILY_CREATURE",
	subfamily    = "SUBFAM_LIFE_HUMAN",
	classification = "CLF_DEFAULT",
	flags        = "FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION",
	weargroup    = "WEARGROUP_SERAPHIM",
	-- 3d model + animation info
	model0Data = {
	  name         = "models/heroes/seraphim/c_sera_skin.GR2",
	  user         = "WEARGROUP_INVALID",
	},
	-- logic bounding box
  logicBox = {
    minx=-9.623, miny=-8.72, minz=0.12, 
    maxx=12.52, maxy=13.248, maxz=72.018, 
	},
	dangerclass   = 0,
}
mgr.typeCreate(1, newItemType);
...

If the flags are stored as global integers, why are the flags stored in the itemtypes as Strings? Did you ever wonder that?

To me this looks like an exporting mistake.

Did someone ever try to remove the quotation marks? From this:

flags        = "FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION",

To this:

flags        = FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION,

?

What happens?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up