Placing reclaim on sea floor?

Interesting mapping tools and mapping help.

Moderator: Morax

Placing reclaim on sea floor?

Postby Evildrew » 30 Jun 2017, 17:21

Is it possible for frigate reclaim to spawn on sea floor instead of floating on the water?

It is possible in the map editor to have the boats be attached to the grid on sea floor when saving but ingame they appear on water surface level once the game launches...

Does anyone know if it is possible?
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Placing reclaim on sea floor?

Postby Morax » 30 Jun 2017, 19:43

I'm not home so I cannot try but turn off water layer, place a unit, enable "auto snap to ground," then while holding Ctrl drag the unit a bit and maybe it attaches like markers and props.
Maps and Modifications Councilor

M&M Discord Channel

Come join us and help create content with the artists of FAF.
User avatar
Morax
Councillor - Maps and Mods
 
Posts: 2865
Joined: 25 Jul 2014, 18:00
Has liked: 1167 times
Been liked: 662 times
FAF User Name: Morax

Re: Placing reclaim on sea floor?

Postby CookieNoob » 30 Jun 2017, 20:00

yes and no.

the code for the wrecks usually generates the ship wrecks on the water surface. However... you can use
Code: Select all
Warp( unit, location, [orientation] )
to move the wreck on the bottom of the ocean.

I suggest to use something like
Code: Select all
local wrecklist = ScenarioUtils.CreateArmyGroup('ARMY_17', 'frigatewrecks', true)
for _, wreck in wrecklist do
    local position = wreck:GetPosition()
    Warp(wreck,position[1], GetTerrainHeight(position[1],position[3]),position[3],wreck:GetOrientation())
end


I didnt test it, but when you do that in OnStart() of the map script the wrecks that are defined in the "frigatewrecks" group should be snaped to the sea floor
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

Re: Placing reclaim on sea floor?

Postby Evildrew » 01 Jul 2017, 02:03

That is what i tried Morax, doesnt work, will have to figure out how to do cookienoobs suggestion :p
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest