Author Topic: Would it be possible to script...  (Read 1953 times)

lol, might you care to point them out?
nah im too lazy






fine.
redo of the script:

Code: [Select]
function MA5C_ICWSImage::onLoadCheck(%this,%obj,%slot)
{
if(%obj.toolAmmo[%obj.currTool] <= 0)
%obj.setImageAmmo(%slot,0);
} else {
%obj.setImageAmmo(%slot,1);

if(%obj.toolAmmo[%obj.currTool] > 16) {
%obj.mountImage(MA5C_ICWSImage,0);
%obj.unMountImage(MA5C_ICWSmedImage,0);
%obj.unMountImage(MA5C_ICWSlowImage,1);
}
if(%obj.toolAmmo[%obj.currTool] <= 16) {
%obj.mountImage(MA5C_ICWSmedImage,0);
%obj.unMountImage(MA5C_ICWSImage,0);
}
if(%obj.toolAmmo[%obj.currTool] <= 7) {
%obj.mountImage(MA5C_ICWSlowImage,0);
%obj.unMountImage(MA5C_ICWSmedImage,1);
}
}

function MA5C_ICWSImage::onReloadStart(%this,%obj,%slot)
{
%obj.toolAmmo[%obj.currTool] = 0;
%obj.unMountImage(MA5C_ICWSImage,0);
%obj.unMountImage(MA5C_ICWSmedImage,1);
%obj.mountImage(MA5C_ICWSlowImage,0);
}

function MA5C_ICWSImage::onReloaded(%this,%obj,%slot)
{
%obj.toolAmmo[%obj.currTool] = 32;
%obj.setImageAmmo(%slot,1);
}
sorry for tri-post
You forgot alot of brackets.

Also, oh wow what happened to all the spaces

lol, thanks man

edit: it made the weapon not show up on the list!

edit-II:

hurray for syntax errors ^^^

i removed 2 of the brackets and it works ingame again, but it still doesnt do what i wanted. in the BG console it says "Wrong number of arguements" and a thing says <int slot> if that helps at all
« Last Edit: August 15, 2011, 10:59:18 PM by Midway Sentinel »

what brackets did you remove

the ones right before and after else i think

Oh, then i think its

}
else
{