[Solved]Syntax of SetPoint?
Not even Zeroy's huge CoD 4 script reference database contains it, and SetPoint confuses me.
If you don't know, it looks something like this:
Code:
player.perk1Icon = createIcon( "specialty_bulletdamage_upgrade", 40, 40 );
player.perk1Icon setPoint( "BOTTOM RIGHT", "BOTTOM RIGHT", -120, -300 );
player.perk1Icon.alpha = 0;
player.perk1Icon.hideWhenInMenu = true;
player.perk1Icon.foreground = true;
So what's the syntax of SetPoint?
setPoint( XAlign, YAlign, XOffset, YOffset )
Example:
setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", 0, 0 );
setPoint( "CENTER", "CENTER", 0, 0 );
In your example:
setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -120, -300 );
It will place your icon at the bottom right with a XOffset of -120 and YOffset of -300 which means it will move it towards the left 120 pixels and 300 pixels towards the top. The negative sign makes it go in the opposite direction of the chosen position. (Opposite of right is left and opposite of bottom is top)