So , this is actually the first time I try to use Offset in a weapon and I would like to match the sprite horizontally as a sight I'm drawing on screen.
So I tried doing this:
Fire:
TNT1 A 0 A_JumpIfInventory("Sighted1",1,1)
Goto Load
PISG A 4 Offset(ACS_NamedExecuteWithResult("GetXOffset",0,0,0,0), 0)
TNT1 A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
...
...
PISG B 5 A_ReFire
Goto Ready
And this being called:
Script "GetXOffset" (void)
{
int x=0;
x= ((angle-32864)*-1) /1000;
SetResultValue(x);
}
But I got an "Bad Numeric Constant" error :/
Somebody knows why ???