Projectiles have a property hit_at_collision_position, which determines whether any rendered action effects (like create-particle, create-entity etc.) are delivered at the location the projectile hit the collision box. For example, if a bullet strikes a biter nest at the top left corner, the "flash" explosion is rendered at that location and any particles emitted by that explosion are rendered as emanating from that location.
Beams don't have any such property. They do have the random_target_offset property, which means that beam emitters choose a random location within the target collision box to fire at - this gives a nice randomness to beam attacks and stops the beam from firing at folks' feet like it used to.
However, any create_particle effects etc. applied alongside the damage are still rendered from the central entity position. You don't have any leeway there - you can't render particles or explosions from the "tail" part of the beam definition, so you can only do it from the action delivery along with the damage. You can't do it nicely from the damage_effect_trigger property of entities - for example the blood emitted by biters doesn't come from the place the projectile or the beam targetted, it comes from the lower centre of the biter's body.
Would it be possible to have something that ties rendered trigger effects to the hit point of beams, the way you can with projectiles?
Use case: lasers that produce showers of sparks. If this was in damaged_trigger_effect instead - I don't know how you would get the location of the random beam target into that effect - you could have damage-specific showers of rubble from laser-struck walls, globs of meat from nests etc.
Equivalent of hit_at_collision_position for beams
Place to ask discuss and request the modding support of Factorio. Don't request mods here.
- Deadlock989
- Smart Inserter
- Posts: 2528
- Joined: Fri Nov 06, 2015 7:41 pm
Equivalent of hit_at_collision_position for beams
Post by Deadlock989 »
- Attachments
-
- Untitled.jpg (457.42 KiB) Viewed 462 times
Return to “Modding interface requests”
Jump to
- General
- ↳ Releases
- ↳ News
- ↳ General discussion
- ↳ Multiplayer
- ↳ Find Servers / Tools / Guides
- ↳ Show your Creations
- ↳ Videos
- ↳ Combinator Creations
- ↳ Mechanical Throughput Magic (circuit-free)
- ↳ Railway Setups
- ↳ Energy Production
- ↳ Medium/Big/Gigantic Sized Structures
- ↳ Fan Art
- ↳ Gameplay Help
- ↳ Spread the Word
- ↳ Off topic
- ↳ This Forum
- ↳ Celebration Party
- Support
- ↳ Gameplay Help
- ↳ Discover Factorio Wiki
- ↳ Discover Others Creations
- ↳ Discover Mods
- ↳ Discover Tools Around Factorio
- ↳ Technical Help
- ↳ Bug Reports
- ↳ Resolved for the next release
- ↳ Fixed for 2.0
- ↳ Assigned
- ↳ Not a bug
- ↳ Pending
- ↳ 1 / 0 magic
- ↳ Duplicates
- ↳ Minor issues
- ↳ Desyncs with mods
- ↳ Won't fix.
- ↳ Resolved Problems and Bugs
- Factorio Direction
- ↳ Ideas and Suggestions
- ↳ Outdated/Not implemented
- ↳ Frequently Suggested / Link Collections
- ↳ Implemented Suggestions
- ↳ Implemented in 2.0
- ↳ Development Proposals
- ↳ Balancing
- Contributions
- ↳ Mods
- ↳ Download mods
- ↳ Mod portal Discussion
- ↳ Mods
- ↳ Mod Packs / Libs / Special Interest
- ↳ 5dim's mod
- ↳ Angels Mods
- ↳ Atomic Power
- ↳ Bob's mods
- ↳ DyWorld
- ↳ F.A.R.L
- ↳ Fentus Challenge & Tool Mods
- ↳ Logistic Train Network
- ↳ MoMods
- ↳ Reika's Mods
- ↳ Resource Spawner Overhaul
- ↳ Yuoki Industries
- ↳ PyMods
- ↳ Questions, reviews and ratings
- ↳ Modding Discussions
- ↳ Modding discussion
- ↳ Modding help
- ↳ Ideas and Requests For Mods
- ↳ Modding interface requests
- ↳ Implemented mod requests
- ↳ Implemented for 2.0
- ↳ Already exists
- ↳ Won't implement
- ↳ Documentation Improvement Requests
- ↳ Resolved Requests
- ↳ Development tools
- ↳ Tools
- ↳ Mod and installation managers
- ↳ Cheatsheets / Calculators / Viewers
- ↳ Development tools
- ↳ Special interest mods and libraries
- ↳ Modding Development
- ↳ Multiplayer / Dedicated Server
- ↳ Multiplayer Board
- ↳ Archive
- ↳ Maps and Scenarios
- ↳ Translations
- ↳ Texture Packs
- ↳ Fan Art
- ↳ Wiki Talk
- ↳ To be sorted
- ↳ Campaign / Scenario suggestions