Post: [Script] - Get to Cover
07-19-2012, 01:35 AM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); i haven't really done any scripting for a while, but i was playing survival mode on Modern Warfare 3 and decided to re-create the 'Get to cover' script which you receive upon near-death.

its nothing big, but hey.. it's something new!

    
get_to_cover()
{
self endon( "death" );

maxhealth = 100;
if( getDvarInt( "scr_hardcore" ) == 1 )
maxhealth = 30;

hint["text"] = self createfontstring("defualt", 3 );
hint["text"] setpoint( "CENTER", "CENTER" );
for(;Winky Winky
{
hint["text"] settext("");
if( self.health < maxhealth - 15 )
hint["text"] settext( "You're hurt. Get to cover!" );

hint["text"].alpha = 1;
if( self.health > maxhealth - 15 )
hint["text"].alpha -= .3;

wait .3;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 10 users say thank you to Correy for this useful post:

247Yamato, Harry, INSAN3LY_D34TH, iPROFamily, Kush Friendly, LightModz, Simple-_-Modz, Taylor, tylerallmighty, Uk_ViiPeR
07-19-2012, 08:25 PM #11
Harry
Former Staff
this would be good to use in a gamemode Winky Winky thanks for the release + you should use iPrintlnBold's :p
07-22-2012, 01:52 PM #12
Correy
I'm the Original
Originally posted by xYARDSALEx View Post
Currey, use iPrintlnBold, Doesn't use text strings.....


iPrintlnBold wouldn't use the same effect

---------- Post added at 02:52 PM ---------- Previous post was at 02:49 PM ----------

Originally posted by 247Yamato View Post
Not really new :carling: Its in MW3 :dumb:


haha yeah i know, i love how sledgehammer games and activision developed a super sexy game and i'm just remaking it. :whistle:
07-22-2012, 04:19 PM #13
Originally posted by Correy View Post
i love how sledgehammer games and activision developed a super sexy game and i'm just remaking it


haha, i love how you think writing 13 lines of code constitutes remaking MW3 :carling:

The following user thanked x_DaftVader_x for this useful post:

247Yamato
07-22-2012, 04:33 PM #14
Originally posted by Correy View Post
i haven't really done any scripting for a while, but i was playing survival mode on Modern Warfare 3 and decided to re-create the 'Get to cover' script which you receive upon near-death.

its nothing big, but hey.. it's something new!

    
get_to_cover()
{
self endon( "death" );

maxhealth = 100;
if( getDvarInt( "scr_hardcore" ) == 1 )
maxhealth = 30;

hint["text"] = self createfontstring("defualt", 3 );
hint["text"] setpoint( "CENTER", "CENTER" );
for(;Winky Winky
{
hint["text"] settext("");
if( self.health < maxhealth - 15 )
hint["text"] settext( "You're hurt. Get to cover!" );

hint["text"].alpha = 1;
if( self.health > maxhealth - 15 )
hint["text"].alpha -= .3;

wait .3;
}
}


Why not just use iPrintlnBold? Otherwise, nice coding Smile
07-22-2012, 05:33 PM #15
Correy
I'm the Original
Originally posted by x. View Post
haha, i love how you think writing 13 lines of code constitutes remaking MW3 :carling:


i class myself as 1337 for doing so. :carling:

---------- Post added at 06:33 PM ---------- Previous post was at 06:32 PM ----------

Originally posted by Illodgeical View Post
Why not just use iPrintlnBold? Otherwise, nice coding Smile


it won't use the same effect as the setText does, it works perfect with the person's health, look at the script and you will see. e.g.
the more you are hurt the more intense the text will show, if you damaged a little.. it will be faded text
07-22-2012, 11:05 PM #16
Originally posted by Correy View Post
i class myself as 1337 for doing so. :carling:

---------- Post added at 06:33 PM ---------- Previous post was at 06:32 PM ----------



it won't use the same effect as the setText does, it works perfect with the person's health, look at the script and you will see. e.g.
the more you are hurt the more intense the text will show, if you damaged a little.. it will be faded text


Ahhhh, I see. Instead of changing the alpha the more you get hurt, would it be possible to change the size of the text? Making it bigger the more hurt you are?
07-22-2012, 11:11 PM #17
Fresh Boi
Do a barrel roll!
So, what would this do? :p
07-22-2012, 11:51 PM #18
Correy
I'm the Original
Originally posted by Illodgeical View Post
Ahhhh, I see. Instead of changing the alpha the more you get hurt, would it be possible to change the size of the text? Making it bigger the more hurt you are?


yeah.. but you'd need to figure out some math equations to do so :p
07-23-2012, 05:15 AM #19
Source Code
Bounty hunter
Originally posted by Correy View Post
i haven't really done any scripting for a while, but i was playing survival mode on Modern Warfare 3 and decided to re-create the 'Get to cover' script which you receive upon near-death.

its nothing big, but hey.. it's something new!

    
get_to_cover()
{
self endon( "death" );

maxhealth = 100;
if( getDvarInt( "scr_hardcore" ) == 1 )
maxhealth = 30;

hint["text"] = self createfontstring("defualt", 3 );
hint["text"] setpoint( "CENTER", "CENTER" );
for(;Winky Winky
{
hint["text"] settext("");
if( self.health < maxhealth - 15 )
hint["text"] settext( "You're hurt. Get to cover!" );

hint["text"].alpha = 1;
if( self.health > maxhealth - 15 )
hint["text"].alpha -= .3;

wait .3;
}
}


I think ima need a video to help me figure out what this script does :carling:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo