Cockpit help
Cockpit help
No clue how to do this myself, I'm a coding n00b so.. look:
Simply put, I want a rubber NEEDLE (2.8 default) instead of the rubber BAR. Can anyone give me the simple code to replace it with?
Original cockpit file:
http://www.sendspace.com/file/24m90l
Simply put, I want a rubber NEEDLE (2.8 default) instead of the rubber BAR. Can anyone give me the simple code to replace it with?
Original cockpit file:
http://www.sendspace.com/file/24m90l
Re: Cockpit help
Code: Select all
<!-- rubber meter -->
<NeedleGauge usetemplate="ng">
<DataSet>
<AtomicData field="source" source="player_rubber" />
<AtomicData field="minimum" source="0" />
<AtomicData field="maximum" source="cycle_rubber" />
</DataSet>
<Position x="-0.48" y="0." />
<Caption location="bottom">
<Text value="0xffff33Rubber" />
</Caption>
</NeedleGauge>
Re: Cockpit help
Thanks for trying but then I get an error + it looks like this...
Re: Cockpit help
try to download this file and put it in C:\programs\Armagetron Advanced\resource\included\AATeam (it should already be there)
http://dl.dropbox.com/u/8361041/cockpit-0.3.1-c.dtd
http://dl.dropbox.com/u/8361041/cockpit-0.3.1-c.dtd
Re: Cockpit help
You must define the "ng" WidgetTemplate. Look at the classic cockpit resource that comes with the game.
Code: Select all
<WidgetTemplate id="ng">
<Position x="0." y="-0.9" />
<Size height="0.175" width="0.175" />
<ShowCurrent value="true" />
<ShowMaximum value="true" />
<ShowMinimum value="true" />
<Foreground>
<Solid>
<Color r="1." g="1." b="1." alpha="1." />
</Solid>
</Foreground>
</WidgetTemplate>
Re: Cockpit help
Code: Select all
<NeedleGauge camera="*">
<DataSet>
<AtomicData field="source" source="player_speed" />
<AtomicData field="minimum" source="0" />
<AtomicData field="maximum" source="max_speed" />
</DataSet>
<Position x="-0.165" y="-0.9" />
<Size height="0.15" width="0.15" />
<ShowCurrent value="true" />
<ShowMaximum value="true" />
<ShowMinimum value="true" />
<Text value="Speed" />
<Foreground>
<Solid>
<Color r="1." g="0." b="0." alpha="1." />
</Solid>
</Foreground>
</NeedleGauge>
You've gone too far, turn back!
Re: Cockpit help
Yeah, I don't understand any of this and I keep running into errors, like I said I'm a code n00b. If anyone is kind enough to download the orginal cockpit and put the needle there instead of the meter/bar, then I WILL CHERISH IT FOREVER.
- Discosuperstar
- On Lightcycle Grid
- Posts: 21
- Joined: Thu Dec 31, 2009 6:14 am
Re: Cockpit help
This is what I use:
The color of the needle goes from green to red as rubber gets low. You can mess with the position and size because it's kind of small (0.2.8 style).
Code: Select all
<NeedleGauge>
<DataSet>
<AtomicData field="source" source="player_rubber" />
<AtomicData field="minimum" source="0" />
<AtomicData field="maximum" source="cycle_rubber" />
</DataSet>
<Position x="-0.55" y="-0.9" />
<Size height="0.15" width="0.15" />
<ShowCurrent value="true" />
<ShowMaximum value="true" />
<ShowMinimum value="true" />
<Caption location="bottom">
<Text value="Rubber" />
</Caption>
<Foreground>
<Gradient orientation="value">
<Color r="0." g="1." b="0." alpha="1." at="0." />
<Color r="1." g="1." b="0." alpha="1." at="0.5" />
<Color r="1." g="0." b="0." alpha="1." at="1.0" />
</Gradient>
</Foreground>
</NeedleGauge>
Re: Cockpit help
If you have 3.0, in the resource you will see wrtlprnft folder and inside is the "classic" rubber meter.
In your settings.cfg, right under where it says map_file i wrote "COCKPIT_FILE wrtlprnft/classic-0.0.1.aacockpit.xml"
In your settings.cfg, right under where it says map_file i wrote "COCKPIT_FILE wrtlprnft/classic-0.0.1.aacockpit.xml"
Re: Cockpit help
Thank you, it finally worked.