Gui .png overlay for ironsites
by Logan Strunk · in Torque Game Engine · 12/19/2006 (4:13 pm) · 2 replies
I want to make a .png overlay on my screen to simulate ironsites for my guns.
I created a "rifleiron.gui" using the gui editor.
I exec it where it needs to be. Now, when I re run the gui editor, its there.
then, in default.bind.cs I add
$IronRifleState = false;
function toggleIronRifle() {
if ($IronRifle == false) {
Canvas.setContent( IronRifle );
$IronRifle = true;
} else {
Canvas.setContent( PlayGui );
$IronRifle = false;
}
}
moveMap.bindCmd(mouse0, button1, "toggleIronRifle();" );
Now, when I press mouse button 1, it should toggle the rifle iron sites on.
I also added the movemap.bind in /client/config.cs
now, its not working, when I press the button.
Am I missing something? Am I going about this wrong?
Could someone PLEASE help me?
I created a "rifleiron.gui" using the gui editor.
I exec it where it needs to be. Now, when I re run the gui editor, its there.
then, in default.bind.cs I add
$IronRifleState = false;
function toggleIronRifle() {
if ($IronRifle == false) {
Canvas.setContent( IronRifle );
$IronRifle = true;
} else {
Canvas.setContent( PlayGui );
$IronRifle = false;
}
}
moveMap.bindCmd(mouse0, button1, "toggleIronRifle();" );
Now, when I press mouse button 1, it should toggle the rifle iron sites on.
I also added the movemap.bind in /client/config.cs
now, its not working, when I press the button.
Am I missing something? Am I going about this wrong?
Could someone PLEASE help me?
Torque Owner Chris Byars
Ion Productions