Removing mass spots and hydros

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Removing mass spots and hydros

Postby EntropyWins » 30 Oct 2016, 15:17

Is there a way to problematically remove mass sports and hydro's (from the Lua code of a map)? I've found `CreateResourceDeposit` and `CreatePropHPR`, though no functions doing the opposite.
Last edited by EntropyWins on 11 Mar 2018, 02:28, edited 1 time in total.
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Removing mass sports and hydros

Postby speed2 » 30 Oct 2016, 15:42

Try to store them in some variable and then call Destroy() on them. Destroying the props is possible, never tried with the actual resource itself.
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Removing mass sports and hydros

Postby EntropyWins » 30 Oct 2016, 17:40

I'm not creating them myself; they are already on the map. Is there a way to iterate over those?
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Removing mass sports and hydros

Postby speed2 » 30 Oct 2016, 18:10

You can over ride the function for spawning resources. Both if it's for a mod or just a single map.
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Removing mass sports and hydros

Postby KeyBlue » 30 Oct 2016, 20:22

Maybe look at some of the Ultimate maps. (or ask CookieNoob, the creator of these maps)
These decide at the start which mass points and hydro spots there need to be in the game.
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Removing mass sports and hydros

Postby EntropyWins » 01 Nov 2016, 22:48

KeyBlue wrote:Maybe look at some of the Ultimate maps. (or ask CookieNoob, the creator of these maps)
These decide at the start which mass points and hydro spots there need to be in the game.


Yeah I did, though only saw them add things, not remove what's already there.

speed2 wrote:You can over ride the function for spawning resources. Both if it's for a mod or just a single map.


Any pointers on how to do that?
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Removing mass sports and hydros

Postby CookieNoob » 04 Nov 2016, 17:13

EntropyWins wrote:
KeyBlue wrote: [..]or ask CookieNoob, the creator of these maps [..]


Yeah I did, though only saw them add things, not remove what's already there.

nah you didn't ;)

if you only want a pointer how to do it: overwrite the CreateRessources() function and store all markers in a table. Then use the destroy() function to remove them again. Make sure you also destroy the mex on top. If you want an example how to find a mex on the mass spot look at the expansion part of the ultimate script, there is a function that counts mex in an area. To find the mex you are looking for, dont look at the entire map, but at the position where the marker is destroyed +-1 in x and z direction. Example for that is in the tree regrow part of the script.

btw this is not the correct place for a mapping question ;)
Check out the next level of maps: viewtopic.php?f=53&t=13014
For adaptivity, customizability and less clutter in the vault.
User avatar
CookieNoob
Priest
 
Posts: 477
Joined: 02 Aug 2014, 17:07
Has liked: 65 times
Been liked: 249 times
FAF User Name: CookieNoob


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron