UGX-Mods

Call of Duty 5: World at War => Help Desk => Topic started by: Rex109 on May 13, 2018, 09:57:04 pm

Title: What is &&1?
Post by: Rex109 on May 13, 2018, 09:57:04 pm
Hi guys! I'm really new to the forum so forgive me if i am in the wrong section. so... i found a sample script that contains "&&1" in a string, what does it means?
for example:

Code Snippet
Plaintext
self.secretTimer.label = &"Time in left: &&1";

or

Code Snippet
Plaintext
trig sethintstring("Press ^1&&1^7 to select Music");

Please help! i couldn't find nothing on internet.
Title: Re: What is &&1?
Post by: MZslayer11 on May 15, 2018, 01:45:30 am
&&1 is the keybinding for the 'use' key. You need to keep that in there.
Title: Re: What is &&1?
Post by: Harry Bo21 on May 15, 2018, 02:18:22 am
It’s not always the keybind- depends on the context

[{+activate}] is the use button

Top one is a localised string - &””
Title: Re: What is &&1?
Post by: MZslayer11 on May 15, 2018, 03:22:02 am
Yeah what he said
Title: Re: What is &&1?
Post by: Rex109 on May 15, 2018, 12:31:00 pm
It’s not always the keybind- depends on the context

[{+activate}] is the use button

Top one is a localised string - &””

Is there anything that i can read to learn about it? Like an online handbook or smth like that
Title: Re: What is &&1?
Post by: gympie6 on May 15, 2018, 05:26:45 pm
Is there anything that i can read to learn about it? Like an online handbook or smth like that

Have you checked this page?:
https://confluence.ugx-mods.com/display/UGXMODS/Scripting+Guide

This is a wiki for making cod mods
Title: Re: What is &&1?
Post by: Rex109 on May 15, 2018, 06:36:44 pm
Have you checked this page?:
https://confluence.ugx-mods.com/display/UGXMODS/Scripting+Guide

This is a wiki for making cod mods

No, don't worry 'bout that, i know how to script, i wasn't sure about the &&1 thingy.

Btw, i found something about localized string, BUT as you can see from this line of code it refers to a numeric value that is dynamic and changes every second.

Code Snippet
Plaintext
    self endon("secret_done");
    if(isdefined(self.secretTimer))
    self.secretTimer destroy();
    self.secretTimer=newclienthudelem(self);
    self.secretTimer.foreground = true;
    self.secretTimer.alignX = "center";
    self.secretTimer.alignY = "bottom";
    self.secretTimer.horzAlign = "center";
    self.secretTimer.vertAlign = "bottom";
    self.secretTimer.x = 0;
    self.secretTimer.y = -7;
    self.secretTimer.sort = 5;
    self.secretTimer.fontScale = 1.6;
    self.secretTimer.font = "default";
    self.secretTimer.glowAlpha = 1;
    self.secretTimer.hidewheninmenu = true;
       self.secretTimer.label = &"Time in left: &&1";
 
    if(isdefined(level.randomcolor))
        self.secretTimer.glowColor=level.randomcolor;
    else
        self.secretTimer.glowColor=(1,0,0);
    time=120;
    for(i=0;i<time;i++)
    {
        self.secretTimer setvalue(time-i);
        wait 1;
    }
    self.secretTimer setvalue(0);
    self suicide();
    if(isdefined(self.secretTimer))
    self.secretTimer destroy();

I repeat i DIDN'T WROTE THIS CODE