Difference between revisions of "Random site"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Spacing)
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
 
===== Random site =====
 
===== Random site =====
  
This module groups objects into a "site" which can be selected by the ''Random site'' module, it ''must'' be synchronised to one ''Random site - Selector'' module.
+
This module groups objects into a "site" which can be selected by the ''Random site'' module, it '''must''' be synchronised to one ''Random site - Selector'' module.
 
To add objects into the site you can synchronize the objects to the module or set the module area ''Size'' (System: Transformation) and position it to cover the objects you want to be part of the site.
 
To add objects into the site you can synchronize the objects to the module or set the module area ''Size'' (System: Transformation) and position it to cover the objects you want to be part of the site.
  
Line 37: Line 37:
 
=== Example setup ===
 
=== Example setup ===
  
[[File:Random site modules setup.webp|thumb|left|Image showcasing example setup of "Random site" modules.]]
+
[[File:Random site modules setup.webp|thumb|left|Example setup of "Random site" modules.]]
  
 
[[Category: Modules]]
 
[[Category: Modules]]

Latest revision as of 13:37, 5 June 2022

Random site

This page will guide you through adding the Random site modules to your mission.

These modules allow mission maker to setup multiple "sites" in the Editor and have only selected amount of them present in the mission, allowing for more random gameplay.

Eden Editor - Setting up the site

To properly setup "random site" multiple different modules need to be placed, Random site - Selector and one Random site module is minimal setup for properly working site.

Random site - Selector

This module is the root of the Random site, there must be only one Random site - Selector module per group of synchronised site modules.

Attributes:

  • Amount - defines how many of sites (defined by synchronised Random site modules) will be present in the mission.


Random site

This module groups objects into a "site" which can be selected by the Random site module, it must be synchronised to one Random site - Selector module. To add objects into the site you can synchronize the objects to the module or set the module area Size (System: Transformation) and position it to cover the objects you want to be part of the site.

Attributes

  • Size - Area size used to detect objects being part of the site, found out in the System:Transformation category
  • Site weighting - Weight value of the site in the selection process, see selectRandomWeighted


Random site - Executor

This module executes provided code on synchronized objects after site it is synchronized to is selected by the Random site - Selector module. It can be synchronized to multiple objects and Random site modules.

Attributes

  • Code - code to be executed on every synchronized object, the object is passed as _this variable


Example setup

Example setup of "Random site" modules.