Arcen Games
General Category => Starward Rogue => Topic started by: Logorouge on February 13, 2016, 11:53:20 pm
-
I just noticed the flying debris from those blue generator thingies seem to trigger the OnEnemyKill abilities. That doesn't really feel right. Is it intended that way?
-
Knowing the XML I think it's unavoidable, rather than intended
</entity>
<entity name="AntiGravitateBlock"
display_name="AntiGravitateBlock"
category="Obstacle"
special_object_type="AntiGravitateBlock"
max_health="150"
>
<hitbox radius="96" />
<system type="AntiGravitateBlock" offset="0,0" />
</entity>
<system name="AntiGravitateBlock"
category="DirectUseSystem"
firing_timing="AllTheTime"
only_fires_on_death="true"
fire_rate="2"
image_name="Invisible"
>
<effect timing="OnUse" type="SpawnEnemy" times_to_check="2" chance_out_of_100_to_happen="50" related_entities="AntiGravitateShards100" magnitude="10" second_magnitude="50" third_magnitude="90" />
<effect timing="OnUse" type="SpawnEnemy" times_to_check="3" chance_out_of_100_to_happen="50" related_entities="AntiGravitateShards70" magnitude="30" second_magnitude="70" third_magnitude="120" />
<effect timing="OnUse" type="SpawnEnemy" times_to_check="4" chance_out_of_100_to_happen="50" related_entities="AntiGravitateShards50" magnitude="50" second_magnitude="90" third_magnitude="150" />
<effect timing="OnUse" type="SpawnEnemy" times_to_check="7" chance_out_of_100_to_happen="50" related_entities="AntiGravitateShards20" magnitude="70" second_magnitude="120" third_magnitude="220" />
</system>
It's needing to use spawn enemy (which requires the thing spawned to be one), as it's coded to use an effect.
It is impossible to do things that vary the number spawned without using an effect, or at least very, very hard.
You could use the effect to add system and then create tons of systems that fire one bullet pattern (spawning the entity) then die. Which is messy as hell, as you then need something to attach those systems to (can't use the dead parent entity).
-
Ah, that's how it works behind the scene. Very interesting.
So changing it might be more trouble than it's worth. Oh well, thanks for the reply, Ayrix. :)
-
Perhaps asking Arcen to add a SpawnEntity to effects would be worthwhile?
Ayrix, since you did the research, do you want to post it to the mantis?
-
report up, and someone else also posted a duplicate/ related issue.