About Store Forum Documentation Contact



Post Reply 
Search for Objects having certain base
Author Message
Harry Offline
Member

Post: #1
Search for Objects having certain base
Is there a possibility to get a list of Objects having certain base Object? I found method hasBase() but first I need to go through all objects, which lies on the file system (directly or in pak archives) and call this method.

Is there any neat way to do this without checking every object in the root directory? Does the engine keep somewhere folders hierarchy visible in the Editor and it can be accessed even in published version of application?
02-27-2020 06:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #2
RE: Search for Objects having certain base
Mhhh not sure, but is there any reason why you cannot keep a list yourself ?
02-27-2020 08:48 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
RE: Search for Objects having certain base
For simplest purposes I could, but I'd like to have this solution dynamic. I'm upgrading my old project built on first version of Esenthel and it contained mission editor system, which allows to select in-game assets as targets to collect/kill. Later I also planned to give players the ability to create their own simple assets and use them in custom missions.

To make it dynamic I was searching game content and looking for files having .obj extension and/or certain name. Now the names are UIDs.

I found DecodeFileName() functions, which should convert UID to file name. I'll check what exact value they return in the string.
02-27-2020 09:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Search for Objects having certain base
02-27-2020 11:09 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #5
RE: Search for Objects having certain base
Yes I saw that and checked. But it looks like it requires Editor to work. I'd like to have a solution that does not need to connect with Editor. The solution, which anybody can use without additional need to install EE.
02-27-2020 11:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Search for Objects having certain base
https://esenthel.com/?id=doc#Project_Files
Quote:If you need to access the name of Elements, from your game, without using the there, then please first extract the necessary data using the , save it to a file, import that file to your project, load that file in your game, and use the data there.
02-28-2020 12:32 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #7
RE: Search for Objects having certain base
Decodefilename if i am not mistaking doesnt convert uid to a path( or filename), but to uid to automatically generated name in editor ( it will look like when you create a project in the editor, ie: hdkeb6jdkensksj)
I wouldn't recommend having people dropping file in your game folder directly, as this sound like an update nightmare.
I would just make them load it directly into your game using window io ( there is a premade class for that ) and convert this into a dynamic list made and controlled by your own custom class.
I do this on part of my game with uploading images for custom campaign, and i wouldnt have it any other way.
Sometime it turn out to be less work when youre in control of all input
(This post was last modified: 02-28-2020 05:25 PM by RedcrowProd.)
02-28-2020 03:52 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #8
RE: Search for Objects having certain base
@RedcrowProd
Yes, I found how it works in the Documentation.

Of course my idea wasn't to put files directly to game folder, but to upload them inside the game, which would process it to desired output.

Anyway I'm just playing with it rather than creating real system and finding out if such things are possible with EE.

@Esenthel
I will try, thanks.
(This post was last modified: 02-28-2020 08:57 PM by Harry.)
02-28-2020 08:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply