ItsMods

Full Version: Scorepopups and Earthquakes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, Smile

Another simple tutorial, I do about this 2 things because I have seen more than 1 guy asking me for this. The first is to do a scorepopup in colours, is nice to kill and see for example a +100 in blue or green, is much better than see it in white, Awesome

This is it, is located in _rank.gsc.

Code:
scorePopup( amount, bonus, hudColor, glowAlpha )

Now, lets do an example, this will make that everytime we kill somebody, it will appear on screen a +500 points in green.

Code:
ColourScores()
{
    while(1)
    {
        self waittill("killed_enemy");
        self thread maps\mp\gametypes\_rank::scorePopup(500,0,(0,1,0),1);
        wait 0.06;
    }
}

Nyan Cat

The second command is the earthquake, is just a shake. It works like this:

Code:
    Earthquake( Scale, Time, Position, Radius)

Lets put an example of a big earthquake:

Code:
    Earthquake(4,15,self.origin,10000);

Thats all, I´ll be posting easy tutorials like this often, many work in BO too. Nyan Cat
would this work?

Code:
Eathquake()
{
    self endon("disconnect");

    for(;;)
    {
            self waittill("spawned_player");
    }
    
        Earthquakes
        {
        Earthquake(4,15,self.origin,10000);
        }
    }
}
(07-23-2011, 17:10)birdplane Wrote: [ -> ]would this work?

Code:
Eathquake()
{
    self endon("disconnect");

    for(;;)
    {
            self waittill("spawned_player");
    }
    
        Earthquakes
        {
        Earthquake(4,15,self.origin,10000);
        }
    }
}

Thats a epic fail, Confused
(07-23-2011, 17:12)Yamato Wrote: [ -> ]
(07-23-2011, 17:10)birdplane Wrote: [ -> ]would this work?

Code:
Eathquake()
{
    self endon("disconnect");

    for(;;)
    {
            self waittill("spawned_player");
    }
    
        Earthquakes
        {
        Earthquake(4,15,self.origin,10000);
        }
    }
}

Thats a epic fail, Confused


why?
Code:
Eathquake()
{
    self endon("disconnect");

    for(;;)
    {
            self waittill("spawned_player"); //for what?
    }
    
       Earthquakes // O.o
        {
        Earthquake(4,15,self.origin,10000);
        }
    } // <- ?
}
// what would that help?
(07-23-2011, 17:22)birdplane Wrote: [ -> ]// what would that help?

Maybe means that is a fail there, dont know, Undecided
There's a { too much with //<~ he tried to show you the error Smile
Actually there is a easier way to change the color of the text when you kill someone.

Search in rank.gsc for something this:

self.hud_scorePopup.color = hudColor;

Then replace it with something like this:

self.hud_scorePopup.color = (0,0,255);

Here is a few examples:

1.0, 0.0, 0.0 - Red
0.0, 0.8, 0.0 - Green
0.9, 1.0, 0.0 - Yellow
0.0, 0.0, 1.0 - Blue
0.0, 0.0, 0.0 - Black
1.0, 1.0, 1.0 - White
o hi iso.
@birdplane you can't put a thread inside a thread