I'm trying to get a little deeper into understanding the ES and optimizing exactly how to use it so I thought I'd toss a thread here for some questions - only really expecting Immortius to have the answers but I figure it might be insightful in general for it to be in the forum
Starting off I've long wondered how come placing a portal block creates two spawner-bearing entities. Only one of them becomes a "valid" Spawner (requires that it also hold either a Block or Location component) and actually spawns stuff - and actually the one entity is both where I thought a block would be a block (integer position) and a model would have a location (float position).
Here they are via dumpEntities:
Starting off I've long wondered how come placing a portal block creates two spawner-bearing entities. Only one of them becomes a "valid" Spawner (requires that it also hold either a Block or Location component) and actually spawns stuff - and actually the one entity is both where I thought a block would be a block (integer position) and a model would have a location (float position).
Here they are via dumpEntities:
Code:
{
"id": 95,
"parentPrefab": "engine:blockType",
"portals:Spawner": {
"minDistance": 0,
"timeBetweenSpawns": 5000,
"rangedSpawning": false,
"range": 20,
"maxMobsPerSpawner": 16,
"playerNeedRange": 10000,
"lastTick": 0,
"types": "RedTeamLAS",
"needsPlayer": false
},
"engine:PlaySoundAction": {
"volume": 1.0,
"relativeTo": "Instigator",
"sounds": "portals:spawn"
},
"portals:Portal": {},
"portals:Holding": {
"queenMax": 5,
"queenThreshold": 10,
"queenCurrent": 0
},
"engine:BlockType": {
"block": "portals:portal"
}
},
Code:
{
"id": 96,
"parentPrefab": "Portals:portal",
"engine:Location": {
"position": [
-3.0,
138.0,
7.0
],
"scale": 1.0,
"rotation": [
0.0,
0.0,
0.0,
1.0
],
"replicateChanges": true
},
"portals:Spawner": {
"lastTick": 153096
},
"engine:Block": {
"position": [
-3,
138,
7
]
},
"engine:Health": {
"nextRegenTick": 0,
"regenRate": 2.0,
"horizontalDamageSpeedThreshold": 100.0,
"currentHealth": 10,
"maxHealth": 10,
"waitBeforeRegen": 1.0,
"fallingDamageSpeedThreshold": 20.0,
"excessSpeedDamageMultiplier": 10.0
}
},