Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Scorepopups and Earthquakes
#1
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, Ill be posting easy tutorials like this often, many work in BO too. Nyan Cat
Reply

#2
would this work?

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

    for(;;)
    {
            self waittill("spawned_player");
    }
    
        Earthquakes
        {
        Earthquake(4,15,self.origin,10000);
        }
    }
}
I like turtles
[Image: thumb-275x274-design-609.png]

Reply

#3
(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
Reply

#4
(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?
I like turtles
[Image: thumb-275x274-design-609.png]

Reply

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

    for(;;)
    {
            self waittill("spawned_player"); //for what?
    }
    
       Earthquakes // O.o
        {
        Earthquake(4,15,self.origin,10000);
        }
    } // <- ?
}
Reply

#6
// what would that help?
I like turtles
[Image: thumb-275x274-design-609.png]

Reply

#7
(07-23-2011, 17:22)birdplane Wrote: // what would that help?

Maybe means that is a fail there, dont know, Undecided
Reply

#8
There's a { too much with //<~ he tried to show you the error Smile
Reply

#9
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
Reply

#10
o hi iso.
@birdplane you can't put a thread inside a thread
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply



Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.