Author Topic: Queston about water units.  (Read 2343 times)

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Queston about water units.
« on: 8 May 2011, 05:20:15 »
Can I have a different animation for walking on land and swimming in water for my amphibious unit?
Get the Vbros': Packs 1, 2, 3, 4, and 5!

Zoythrus

  • Guest
Re: Queston about water units.
« Reply #1 on: 8 May 2011, 05:39:46 »
as far as i know.....no.....

Psychedelic_hands

  • Guest
Re: Queston about water units.
« Reply #2 on: 8 May 2011, 10:30:02 »
I asked this exact question to Silnarm the other week, and the answer is no.... But he said it was a good idea, so maybe there's a slight chance of it one day being implemented..... Maybe?  ::) ::)

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Queston about water units.
« Reply #3 on: 10 May 2011, 15:28:53 »
To bad, I wouldn't want my dino to swim inland or walk on the water...
Get the Vbros': Packs 1, 2, 3, 4, and 5!

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Queston about water units.
« Reply #4 on: 10 May 2011, 15:32:00 »
Two units might move between them land-based and sea-based?

I think Mr War tried submarines that way - don't know the outcome

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Queston about water units.
« Reply #5 on: 10 May 2011, 17:57:31 »
I think your best bet is to find an animation that looks alright for both.  It would be nice to have different move skills for different fields, though.  Then you could have different speeds and everything too.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Queston about water units.
« Reply #6 on: 11 May 2011, 22:21:42 »
I did sneak a little something into git.. but now John has me thinking...
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Queston about water units.
« Reply #7 on: 17 May 2011, 15:51:40 »
I think your best bet is to find an animation that looks alright for both.  It would be nice to have different move skills for different fields, though.  Then you could have different speeds and everything too.
Yah, he could waddle slowly on land and swim swiftly in water.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Queston about water units.
« Reply #8 on: 17 May 2011, 20:50:34 »
Water is special .... there are two completly different ways of moving on/in the water:

1. walk on the ground
2. dive/float/swim

dive float swim can be done with different animations/height, but move on ground is a different in general.
I think a full solution might be a special move skill for water movement.

A more simple approach is to just give a a unit a diving_depth property which is used while the unit "walks" in water.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Queston about water units.
« Reply #9 on: 17 May 2011, 20:55:47 »
Water is special .... there are two completly different ways of moving on/in the water:

1. walk on the ground
2. dive/float/swim

dive float swim can be done with different animations/height, but move on ground is a different in general.
I think a full solution might be a special move skill for water movement.

A more simple approach is to just give a a unit a diving_depth property which is used while the unit "walks" in water.

How does the XML look? Are there any examples of units that use these attributes?

(couldn't find anything on the wiki or google; perhaps I looked in the wrong place?)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Queston about water units.
« Reply #10 on: 17 May 2011, 22:26:24 »
Red Alert 3 has lots of units that can go on land and water. Not sure if it helps but here is a xml file for a unit which shows it has transition animations to/from water:
http://forums.commandandconquer.com/jforum/posts/list/21422.page
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Queston about water units.
« Reply #11 on: 28 May 2011, 13:39:05 »
This is how it can be done now,

Code: [Select]
<animation>
<!-- by surface type, if you use this specifiy all that may make sense for this unit,
  -- ie, for amphibious units all three,
  -- for land units 'land' & 'fordable'
  -- for any-water units 'fordable' and 'deep-water'
  -- For units of field 'air' or 'deep-water' this makes no sense.
-->
<surface type="land" path="models/walking.g3d" />
<surface type="fordable" path="models/wading.g3d" />
<surface type="deep-water" path="models/swimming.g3d" />

<!-- all optional, played when changing from one surface type to another -->
<surface-change from="land" to"deep-water" path="models/dive.g3d" />
<surface-change from="fordable" to"deep-water" path="models/dive.g3d" />

</animation>

All skill stats are the same, including animation speed :(  But it is functional, if it gets implemented properly later (at least allowing different anim-speed, if not using seperate skills) and anyone uses this method, it can be 'translated' to the new system in the engine with ease.

Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Queston about water units.
« Reply #12 on: 28 May 2011, 18:57:00 »
Woo, nice. Will this/is this in 0.4?

Also, can this be added to the wiki with all possible variables?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything