View Issue Details

IDProjectCategoryView StatusLast Update
0003223The Dark ModCodingpublic07.09.2012 15:54
Reportertels Assigned Totels  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003223: Add ability for individual entities to randomly not spawn
DescriptionCurrently, when you want entities to disappear at level load due to random factors (f.i. for adding random entities to add replay value), there are only work-arounds like scripts, or using SEED.

Both of these are high overhead for such a simple feature.
Additional InformationSuppose a random_remove spawnarg is read by each entity at spawn. It consists of a float between 0 and 1.0.

If this float is smaller than a random number produced at the same time, the entity removes itself.

So a value of "0.3" means in 30% of all map loads the entity will remove itself (as 0.3 is smaller than 0 <= X <= 1.0 in 70% of all cases of X).

The entities that survive this will ignore their random_remove value during map load.

So starting a map removes some entities randomly, but a save/load cycle keeps the map as it is.
TagsNo tags attached.

Activities

tels

tels

07.09.2012 15:54

reporter   ~0004799

Fixed with revision 0005557.

The spawnarg is called "random_remove" and supported on any entity. The entity will be inhibited from spawning if "random_remove" is smaller than a random number between 0 .. 1.0.

So setting it to 0.3 will make be removed with a 70% chance, setting it to 0.8 means it has a 80% chance to appear in the map.

If you distribute 20 entities with "random_remove" "0.5" on them through a map, roughly 10 of them will appear, and it will be always a different combinations of them when the map gets restarted.

Issue History

Date Modified Username Field Change
07.09.2012 11:12 tels New Issue
07.09.2012 11:16 tels Assigned To => tels
07.09.2012 11:16 tels Status new => assigned
07.09.2012 11:17 tels Product Version => TDM 1.08
07.09.2012 11:17 tels Target Version => TDM 2.00
07.09.2012 15:54 tels Note Added: 0004799
07.09.2012 15:54 tels Status assigned => resolved
07.09.2012 15:54 tels Fixed in Version => TDM 2.00
07.09.2012 15:54 tels Resolution open => fixed