Jingo
July 20th, 2008, 01:28
I would like to do what I think would be a simple mod to the combat tracker. I want to be able to cycle through the FriendFoe icon by clicking on it. Dragging the little red, green, or yellow face icon from below and dropping it takes a long time, especially so if you're wanting to modify a large group.
I think something in the code section below needs to be changed. But I'm only a wannabe scripter and am not familiar with LUA.
Suggestions on what to do?
<genericcontrol name="friendfoe">
<anchored>
<right>
<parent>activatedefensive</parent>
<anchor>left</anchor>
<offset>-8</offset>
</right>
<top>
<parent>link</parent>
<anchor>top</anchor>
<offset>1</offset>
</top>
<size>
<width>20</width>
<height>20</height>
</size>
</anchored>
<icon>indicator_ctffempty</icon>
<stateicons>
<friend>indicator_ctfffriend</friend>
<neutral>indicator_ctffneutral</neutral>
<foe>indicator_ctfffoe</foe>
</stateicons>
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("combattrackerff") then
state = draginfo.getStringData();
window.setFoF(state);
setIcon(stateicons[1][state][1]);
end
end
function setState(s)
state = s;
window.setFoF(state);
if stateicons[1][state] then
setIcon(stateicons[1][state][1]);
else
setIcon(icon[1]);
end
end
</script>
</genericcontrol>
I think something in the code section below needs to be changed. But I'm only a wannabe scripter and am not familiar with LUA.
Suggestions on what to do?
<genericcontrol name="friendfoe">
<anchored>
<right>
<parent>activatedefensive</parent>
<anchor>left</anchor>
<offset>-8</offset>
</right>
<top>
<parent>link</parent>
<anchor>top</anchor>
<offset>1</offset>
</top>
<size>
<width>20</width>
<height>20</height>
</size>
</anchored>
<icon>indicator_ctffempty</icon>
<stateicons>
<friend>indicator_ctfffriend</friend>
<neutral>indicator_ctffneutral</neutral>
<foe>indicator_ctfffoe</foe>
</stateicons>
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("combattrackerff") then
state = draginfo.getStringData();
window.setFoF(state);
setIcon(stateicons[1][state][1]);
end
end
function setState(s)
state = s;
window.setFoF(state);
if stateicons[1][state] then
setIcon(stateicons[1][state][1]);
else
setIcon(icon[1]);
end
end
</script>
</genericcontrol>