Opened 7 years ago

Closed 6 years ago

#533 closed enhancement (fixed)

Tree felling widget

Reported by: beherith Owned by:
Priority: minor Milestone:
Component: BAR Version:
Keywords: Cc:

Description

This is just brainstorming, but I like that engine trees get knocked down, and I think non engine ones could be as well. I think if a features has energy only, it can safely be assumed to be a plant ( the reclaim flash widget already does this).

If on featuredestroyed, one can tell if the feature was crushed, and one can tell which unit crushed the feature, then it could be possible to just render the feature with a rotation matrix and see it fall.

Any thoughts?

Change History (6)

comment:1 by beherith, 7 years ago

Hmm, seems like one cannot get the unitID of the destroyer or if it was crushed in the featuredestroyed calling. Maybe featurepredamaged?

comment:2 by beherith, 7 years ago

UnitFeatureCollision passes wether it crushed a feature, but one would have to register all trees and all units (probably f*cking expensive, given how often stuff collides) to check if it is a collision we might want to handle.

comment:3 by Funkencool, 7 years ago

In my opinion, FeaturePreDamaged looks the most promising. It could be used for weapon damage as well, maybe even animations for lighter damage (something like rustling perhaps)

Last edited 7 years ago by Funkencool (previous) (diff)

comment:5 by beherith, 7 years ago

Got it done with a simple gadget. Spring.SetFeatureDirection is very wierd, so: TODO: make features drop in the direction away from whatever killed them.

http://imolarpg.dyndns.org/trac/balatest/browser/branches/BAR/luarules/gadgets/gfx_tree_feller.lua?rev=2228

comment:6 by beherith, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.