Help me code this Mech please

another try to learn how to use Openra.

Information and discussion for custom maps and mods.
Post Reply
Holy_Master
Posts: 62
Joined: Fri Nov 21, 2003 10:04 am

Help me code this Mech please

Post 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.
Attachments
behe.zip
(184.64 KiB) Downloaded 389 times
Last edited by Holy_Master on Tue Feb 24, 2015 7:26 pm, edited 1 time in total.

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Did you try using "RenderInfantry"?
See https://github.com/OpenRA/OpenRA/issues/6806 .

Holy_Master
Posts: 62
Joined: Fri Nov 21, 2003 10:04 am

Post 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.

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Post 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?

Holy_Master
Posts: 62
Joined: Fri Nov 21, 2003 10:04 am

Post 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.

Holy_Master
Posts: 62
Joined: Fri Nov 21, 2003 10:04 am

Post 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.
Attachments
behe.zip
(185.87 KiB) Downloaded 303 times

Post Reply