Forged Alliance Forever Forged Alliance Forever Forums 2020-07-19T00:39:03+02:00 /feed.php?f=53&t=19289 2020-07-19T00:39:03+02:00 2020-07-19T00:39:03+02:00 /viewtopic.php?t=19289&p=185742#p185742 <![CDATA[Re: 2 Question about pre-placing units on the map]]>
On the second question, yes! Yes you can. This is cannot be done in the editor but it can be done through scripting. This is a small example of how the file '<your-map-name>_script.lua' would look like:

Code:
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')

function OnPopulate()
   ScenarioUtils.InitializeArmies()
end

function OnStart(self)

   -- spawn the units
   local army = "ARMY_1"
   local group = "GROUP_1"
   local wreckage = false
   local units = ScenarioUtils.CreateArmyGroup(army, group, wreckage);

   -- make them move along a path
   local chain = "c1"
   local path = ScenarioUtils.ChainToPositions(chain)

   for k, node in path do
      IssuePatrol(units, node)
      -- or:
      -- IssueMove(units, node)
   end

end


Another note: in comparison to the Discord channel on map making these forums aren't that alive anymore. You can find it here: https://discord.gg/gN4SdPb

Statistics: Posted by Jip — 19 Jul 2020, 00:39


]]>
2020-05-21T19:34:17+02:00 2020-05-21T19:34:17+02:00 /viewtopic.php?t=19289&p=184332#p184332 <![CDATA[2 Question about pre-placing units on the map]]>
Using the latest ozonex editor (as of now v0.606-Alpha WIP9) I have a problem and question:

When I place and assign a unit on the map to a player army the game ends as soon as it starts

For example, I have ARMY_1 and ARMY_2. I place a Soul Ripper near each base with the assignment to that army. As soon as the game starts it tells me the other player has been defeated. The ACU does not even deploy at that point... just the map, then the end. I did place a unit assigned to a non-player ARMY and did not have a problem. Once I removed the two units, the map worked fine again. Is there a way to do this?

Can I create a patrol for a non-player ARMY?

Here is a simple example: Let's say I wanted to have an experimental wandering around the middle of the map, just shooting up anyone that comes through. I get setting the players as the enemy, and I can deploys paths, but I cannot figure out how to make the NPC unit "wander". is this something that can be done via scripting if not the editor?

Thank you for any help!

Statistics: Posted by Vuud — 21 May 2020, 19:34


]]>