OFPEC Forum

Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: nuxil on 13 Sep 2008, 06:38:34

Title: Several Colors on Airplane Hud "Solved"
Post by: nuxil on 13 Sep 2008, 06:38:34
Hi all

is there a way to define diffrent colors for subclasses in class Draw?

(http://img118.imageshack.us/img118/4096/arma2008091305270082ak4.th.jpg) (http://img118.imageshack.us/my.php?image=arma2008091305270082ak4.jpg)

i want the circle to be one color, "the aming of bomb" and the targetbox another,
is this possible?

inside class Draw
Code: [Select]
class Missile
{
alpha = 1;
color[] = {1, 0, 0};
condition = "missile";
class Circle
{
type = "line";
points[] = {LONGLINE};
};
class TargetA
{
type = "line";
points[] = {LONGLINE};
};
class TargetB
{
type = "line";
points[] = {LONGLINE};
};
};

i tried to put in color in each subclass. but it has no effect,

any ideas anyone?
Title: Re: A Airplane Hud Question
Post by: Gnat on 13 Sep 2008, 12:54:13
Sorry nuxil, never experimented in this area. Maybe someone else has ....
Title: Re: A Airplane Hud Question
Post by: nuxil on 18 Sep 2008, 23:43:48
dang..
it doesnt seam to work having 2 colors on 1 subclass.
im gonna try definig a new subclass. i think that should work as long as i use condition="missile" in it.

i'll have it a try..

edit:
yay it works

(http://img209.imageshack.us/img209/1884/arma2008091823505254vf9.th.png) (http://img209.imageshack.us/my.php?image=arma2008091823505254vf9.png)
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: Wolfrug on 19 Sep 2008, 09:45:30
Could you write up a little more specific step-by-step process (maybe copy-paste your config?) to this topic so that other people can profit from your findings too? :) Thanks!

Wolfrug out.
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: nuxil on 19 Sep 2008, 12:14:32
Sure thing.

its actualy verry simple.

Code: [Select]
class AV8_MyAv8B : AV8B
{
                ...
                ...
        class MFD
{
#include "hud.hpp"
};
};

you added that lets. go to the hud.hpp file

i'll not post the entire file. as its way to long..

so in the hud.hpp file you scroll down until you see something called.

class Draw this is the place we want to alter & add things to,

Code: [Select]
class Draw {
alpha = 1;
color[] = {1, 1, 0};
clipTL[] = {0.0, 0.05};
clipBR[] = {1.0, 0.9};
condition = "on";
                .....
                .....
class PlaneW
{
clipTL[] = {0.0, 0.1};
clipBR[] = {1.0, 0.9};
class LineHL
{
type = "line";
points[] = {};
};
};
class Flypath
{
alpha = 1;
color[] = {0, 1, 0};
class Velocity
{
type = "line";
points[] = {};
};
};

class Missile
{
alpha = 1;
color[] = {1, 0, 0};
condition = "missile";
class Circle
{
type = "line";
points[] = {};
};
};

class MissileTarget
{
alpha = 1;
color[] = {0, 0, 1};
condition = "missile";
class Target
{
type = "line";
points[] = {};
};
};
 ....
 ....
};

i did remove the points and unrelated classes in this example. dont worry about that tho..

Lets start with class Flypath in class Draw. this is a new class that has to be made is you want  to change colors for the flypath.. in this classs there is a class called class Velocity
this class was orginaly in class PlaneW. this is the little green box in my picture showing flypath,

Next lets move to class Missile

in this class you should see something called Target. so to change the color of your target "LOCKON"
cut out this class. so the only class in Missile is class Circle. this is the Red Circle you see in my picture,

paste class Target outside class Missile. in example class MissileTarget. as i did,
you see it still uses condition="missile"

now as it is outside class Missile you can change its color.

you still dont understand?
well sorry then.. i cant help you,
maybe you just need some more experimenting. that helps alot :)
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: Planck on 19 Sep 2008, 12:25:37
Marvellous stuff nuxil, this is what is needed to add to the knowledge base for the community, thanks.   :good:


Planck
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: Gnat on 19 Sep 2008, 12:31:06
Well done !
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: Kremator on 14 Oct 2008, 18:38:35
nuxil,

Any chance of releasing a n00bs version of this (either as a replacement config or whatever) as this looks brilliant.  Just right for us flyboys !

[TAO] Kremator
Title: Re: Several Colors on Airplane Hud "Solved"
Post by: kju on 23 Oct 2008, 21:34:47
great  :good:

---

Edit:

Do you intend to release some work based on this?

A "simple" fix to have the standard UI more visible alone would be VERY welcome.  :good: