Sign in to follow this  
Viking

Misc_Model list

Recommended Posts

Hey,

 

i need a plugin which extracts the names of misc_models found in the map and saves them in a textfile for later access.

The name of the txt doesnt matter, but if possible it would be great if it would match the map name.

 

Is that possible?

 

Thanks in advance.

 

edit: I would like to call the plugin/function from gsc ^^

Edited by Viking

Share this post


Link to post
Share on other sites

Oops, my tools are too advanced, the game doesn't return them by default. :D

returnmodels()
{
	models = getentarray();
	for(i = 0; i < models.size; i++)
	{
		if(isdefined(models[i].model))
		printf("Entity " + i + " uses model: " + models[i].model + "\n");
	}
}

Enjoy.

Share this post


Link to post
Share on other sites

misc_models are the models added to the map by radiant.

you can't get them with getEntArray()

Share this post


Link to post
Share on other sites

Language barrier?
The misc_model you're looking for gets converted at map compilation. You can read it from game memory, but that requires more knowledge.

Share this post


Link to post
Share on other sites
7 hours ago, Viking said:

Doesn't work, it returns an empty array.

Then required plugin which reads names of xmodels from pool and saves it to script's array.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this