• 0
GamersRoost

OnCursorTarget - Simulated objects?

Question

Posted (edited)

How can I make buildings that are on a map, be "targetable" by a players cursor?

Example:

On my test server, the loot does not spawn in several buildings, even though they are all correctly in the Config.cpp and the classnames are correct.

Some buildings it spawns fine. Loot spawns exactly where the positions were placed.

After some troubleshooting, I find that when I spectate myself, using @infiSTAR I can see my cursor target in real time. Its red under the states on the left.

I have found that the buildings that I can "target" with my cursor, are spawning loot (if its defined in the config.cpp). I have found that buildings that are in the Config.cpp, that do not show the red letters or Shift i, will NOT spawn loot.

How can I make these buildings "interactable" with the cursor target?

Here is screenshots of my explanation:

D68B0DB4EC20C10AC6B61428F37804D854AA46CF

Edited by GamersRoost

Share this post


Link to post
Share on other sites

11 answers to this question

  • 0

cursorObject returns the object (more precise than cursorTarget)

 

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, infiSTAR said:

cursorObject returns the object (more precise than cursorTarget)

 

Do you know what makes the map insert objects that are "targetable", Chris?

I see there is 919 mission objects on this map, but there is WAY more buildings than that. If i can "target" the objects, they spawn loot. Since they are not "targetable" i cannot get them to trigger the loot system. Any help would be awesome on this.

Thanks a lot for answering,

Josh

Share this post


Link to post
Share on other sites
Advertisement
  • 0

How do you try to target them to spawn loot on them?

Share this post


Link to post
Share on other sites
  • 0

it's pretty hard to put into text what i mean, but i will certainly try.

When your toon is running around in the world, it seems that the "cursor target" triggers the loot system.

Some buildings i can see the red text and others i cannot. (when using your tools to spectate myself).

If the red text shows up, i can 100% of the time get loot to spawn on a regular normal interval.

If the red text does not show up, loot will not spawn in that or around that building.

for instance, I can "target" with my cursor a wooden gate. If i added the classname to my cfgbuildings, i can get loot to spawn anywhere i want on that gate.

But a Land_Stouda_C (made up the name) does not show the red tet when i "look at it" in game, so it will never spawn loot, even when i have it setup properlu in cfgBuildings.

Its confusing, but i think that if i could make the buildings all "targetable" with some simulation or serialization command, i feel they would all spawn loot correctly.

I am literally at the point of placing an object like a bucket and using that to spawn loot off of in the editor, since i cannot figure out how to make these buildings known to my character in-game.

Share this post


Link to post
Share on other sites
  • 0

Try to replace your ExileServer_system_lootManager_network_spawnLootRequest.qf in the exile_server pbo and see if that's enough to change this

new code here:
 

Spoiler

/**
 * ExileServer_system_lootManager_network_spawnLootRequest
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID","_parameters","_buildingNetIDs","_building"];
_sessionID = _this select 0;
_parameters = _this select 1;
_buildingNetIDs = _parameters select 0;
{
	_building = objectFromNetId _x;
	try 
	{
		if (isNull _building) throw false;
		if (isObjectHidden _building) throw false;
	//	maybe this is the problem
	//	if !(isClass(configFile >> "CfgBuildings" >> typeOf _building)) throw false;
		if (_building getVariable ["ExileHasLoot", false]) throw false;
		_building call ExileServer_system_lootManager_spawnLootInBuilding;
	}catch{};
} forEach _buildingNetIDs;

 

 

Share this post


Link to post
Share on other sites
  • 0
12 minutes ago, infiSTAR said:

Try to replace your ExileServer_system_lootManager_network_spawnLootRequest.qf in the exile_server pbo and see if that's enough to change this

new code here:
 

  Hide contents


/**
 * ExileServer_system_lootManager_network_spawnLootRequest
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID","_parameters","_buildingNetIDs","_building"];
_sessionID = _this select 0;
_parameters = _this select 1;
_buildingNetIDs = _parameters select 0;
{
	_building = objectFromNetId _x;
	try 
	{
		if (isNull _building) throw false;
		if (isObjectHidden _building) throw false;
	//	maybe this is the problem
	//	if !(isClass(configFile >> "CfgBuildings" >> typeOf _building)) throw false;
		if (_building getVariable ["ExileHasLoot", false]) throw false;
		_building call ExileServer_system_lootManager_spawnLootInBuilding;
	}catch{};
} forEach _buildingNetIDs;

 

 

dude....... you are a fucking GOD. I mean that.

 

Share this post


Link to post
Share on other sites
  • 0

Did you try it yet? don't be happy to fast haha - just a wild guess

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, infiSTAR said:

Did you try it yet? don't be happy to fast haha - just a wild guess

i mean for even trying to help -- LOL !!!

I will report back later today i need to be off for work now. late already! Thanks again man, so much.

www.whosawesome.com

Share this post


Link to post
Share on other sites
  • 0

Well, thanks for the help. It remains the same issue.

I will take the time out to do all the gates (they show up) and since they are in every single town alteast that will be some loot other than the buildings that already have loot.

Thanks again Chris.

Josh

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.