Author Topic: something to share  (Read 1118 times)

Mr War

  • Guest
something to share
« on: 8 January 2012, 23:11:21 »
I've added particles to highlight the sight and attack range of a unit using the conical particles Will added (works in MG 3.6). It's far from perfect but thought I'd share as a) someone might want to add this trick to their own mod and b) a better version of this functionality might be something for the Devs to consider.

Essentially the same particles as are used to trace helicopter blades in cold War pack.


Red arc shows attack, green shows sight. Arrows added by me - in-game the two arcs flicker, so it's much more obvious than in the screenshot.

I added these to a specific skill, so they only show when the user sets the skill state to "show ranges". Extract of unit xml

Code: [Select]
<skill>
<type value="stop"/>
<name value="show_range_skill"/>
<ep-cost value="0"/>
<speed value="400"/>
<anim-speed value="400"/>
<animation path="../ji_bing/models/bowman.g3d"/>
<particles value="true" start-time="0.1" end-time="0.13">
<particle-file path="particle_range.xml">
<shape value="conical">
<angle value="90"/>
</shape>
<radius value="8"/>
<min-radius value="7.9"/>
<direction x="0" y="0.1" z="0"/>
<offset x="0" y="0" z="0"/>
</particle-file>
<particle-file path="particle_sight.xml">
<shape value="conical">
<angle value="90"/>
</shape>
<radius value="15"/>
<min-radius value="14.9"/>
<direction x="0" y="0.1" z="0"/>
<offset x="0" y="0" z="0"/>
</particle-file>
</particles>
<sound enabled="false"/>
</skill>


Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: something to share
« Reply #1 on: 9 January 2012, 02:21:37 »
Interesting use of particles! Would be useful for showing attack ranges for unpack able units and stationary weapons and defenses.

This kinda information would be useful when deciding where to put base defenses!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Hagekura

  • Archmage
  • ******
  • Posts: 524
    • View Profile
    • Hageus_Iaponicus(@Hageus_Hagekura)さん | Twitter
Re: something to share
« Reply #2 on: 9 January 2012, 02:31:30 »
Very good work! :thumbup:
It might be useful for display attack-boost effect range also.
Bushido to iu wa shinu koto to mitsuketari.

Japanese Faction Mod

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: something to share
« Reply #3 on: 9 January 2012, 10:37:16 »
Very nice.  Will be defeated by uneven terrain I think.

Is it possible to attach a particle like this to the placing of a unit, so you see it before you place the tower and such?

treba

  • Guest
Re: something to share
« Reply #4 on: 9 January 2012, 16:29:24 »
hm this makes me think of scenarios where you have to sneak into a enemy base or something in that direction.
also it could be useful for siege tanks or catapults that can only attack when in siege mode.
would it be possible to make it only visible for the owner of the unit?

Mr War

  • Guest
Re: something to share
« Reply #5 on: 9 January 2012, 18:40:30 »
The way I'm doing it, it is visible to all players but can be switched on/off. I'm only adding the particles to specific stop skills and can use it for all relevant units or buildings, including boost range.

It generally looks worse the bigger the circle is, and i'll try using different particle images for better effect.

I can't see any way to shoe this for buildings before they are built but will try.

 

anything