Page 1 of 1

Help me code this Mech please

Posted: Tue Feb 24, 2015 1:15 pm
by Holy_Master
Ok first feel free to use my mech in your mod if you want [bewarn remap in this shp still need ton of work to make it look ok]
*Note*This mech optimize to use for TD

Image

but I'll be glad if anyone can help me to code him to the game. everything seem fine only real problem is his move animation didn't work with current code he still slide along the ground like TD tank with no animation. [Make me wonder do this engine already support to make mecha unit if not my sprite should be helpful]

and another problem i have is about unit "local offset". Ok i know what is this code but i just not sure which Number is FLH since it not mention in Tutorial.
behe:
idle:
Start: 0
Facings: 32
run:
Start: 32
Length: 8
Facings: 32
Tick: 100
turret:
Start: 288
Facings: 32
muzzle: gunfire2
Start: 0
Length: *
icon: htnkicnh
Start: 0
and i'll be more grateful if anyone help me answer my question in this topic because it really important for my project specialize unit design stage.

http://www.sleipnirstuff.com/forum/view ... 83&t=17070

Thank you everyone for help.

Posted: Tue Feb 24, 2015 4:35 pm
by abcdefg30
Did you try using "RenderInfantry"?
See https://github.com/OpenRA/OpenRA/issues/6806 .

Posted: Tue Feb 24, 2015 5:09 pm
by Holy_Master
sorry i'm too new for coding i don't know how to use or where to place that code at all. and i try to put this unit use as vehicle not infantry.

Posted: Tue Feb 24, 2015 6:05 pm
by abcdefg30
You have to use this in the rules section.
"RenderInfantry" is just a misleading name here (see the link),
I guess you could use it here (but I'm not 100% sure).

May I ask you to paste the rules of your mech as well?

Posted: Tue Feb 24, 2015 6:53 pm
by Holy_Master
Here's my rules code
BEHE:
Inherits: ^Tank
Valued:
Cost: 1000
Tooltip:
Name: Behemoth
Description: Heavily Artillery Walker. \nHas heavy armour.\n Strong vs Buildings. \n Weak vs Aircraft.
Buildable:
BuildPaletteOrder: 80
Prerequisites: anyhq, ~techlevel.medium
Queue: Vehicle.GDI
Mobile:
Crushes: wall, heavywall, crate, infantry
Speed: 50
ROT: 3
Health:
HP: 1000
Armor:
Type: Heavy
RevealsShroud:
Range: 6c0
Turreted:
ROT: 3
Armament:
Weapon: Beheshell
Recoil: 170
RecoilRecovery: 42
LocalOffset: 900,180,340, 900,-180,340
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
RenderUnit:
WithTurret:
AutoTarget:
SelfHealing:
Ticks: 10
HealIfBelow: 50%
DamageCooldown: 200
LeavesHusk:
HuskActor: BEHE.Husk
Explodes:
Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall
Selectable:
Bounds: 34,34,0,-3
i try to use RenderInfantry code already it just make the game crash once i build factory.

Posted: Wed Feb 25, 2015 10:49 am
by Holy_Master
Ah ok I replace RenderUnit with RenderInfantry now he worked.. thank you very much. but please anyone answer my other question about FLH offset.

*Edit*
OK now I fixed his remap color [Thank to Apollo] this's perfect version of him. feel free to use it in your mod but since i design it for TD it can be limit for your mod.