Can it be possible

Started by FinchDon, Sep 13, 2015, 03:47 PM

Previous topic - Next topic

FinchDon

Hello friends i was playing Unreal Tournament 1999 I saw their if you kill two players at a Time Distance of 2 seconds then it show Double Kill if another kill in 2 seconds it show MultiKill then Ultra. Can it be Possible ? in VCMP
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Thijn

Yes. Just keep track of the time of the last kill and see if it's within 2 seconds, then act like you would for a killing spree.
Really easy to do.

KAKAN

Quote from: Thijn on Sep 13, 2015, 04:01 PMYes. Just keep track of the time of the last kill and see if it's within 2 seconds, then act like you would for a killing spree.
Really easy to do.
Yea, Exactly!
Things you need:-
1. A IDEA
2. Some scripting skills
oh no

Debian


.

I'm not even sure what's so hard to implement :-\ People scripted these in games since forever. Take CS 1.6 for example.
.

FinchDon

Unreal Best For Ideas Can i Get Example?
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Thijn

Quote from: FinchDon on Sep 14, 2015, 02:06 AMUnreal Best For Ideas Can i Get Example?
I give you the idea. Execute it. It's really easy if you think about it. Try it.
I'll give you a tiny bit of the logic.
if ( (time() - <lastkilltime killer>) <= 2 ) {

FinchDon

For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

FinchDon

I tried Your Code @Thijn Lol Its Say's Error Expression Expected

Line 921

if ( (time() - <lastkilltime killer>) <= 100 )
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Drake

Quote from: FinchDon on Sep 14, 2015, 10:23 AMI tried Your Code @Thijn Lol Its Say's Error Expression Expected

Line 921

if ( (time() - <lastkilltime killer>) <= 100 )
*facepalm*

EK.IceFlake

Quote from: Drake on Sep 14, 2015, 10:30 AM
Quote from: FinchDon on Sep 14, 2015, 10:23 AMI tried Your Code @Thijn Lol Its Say's Error Expression Expected

Line 921

if ( (time() - <lastkilltime killer>) <= 100 )
*facepalm*
Facepalm

Debian

#11
not tested,
make a lastkill in player class or store value somewhere for a player mostly in array

if ( (time() - stats[player.ID].Lastkill) <= 2 ) {
Message("Finchdon finally made it");
}else stats[player.ID].Lastkill = time();

 


Update1 : stats[player.ID].Lastkill instead of lastkill

MacTavish

Caution:its an untested idea perhaps it works

onScriptLoad()
{
LastKillTime < array(GetMaxPlayers(), null );
}

onPlayerKill( player, killer, reason, bodypart )
{
if ( LastKillTime[killer.ID] == null ) LastKillTime[killer.ID] = time();
if((time()- LastKillTime[killer.ID]) < 1000) // if time is less than 1 sec
{
// your funny script here
}
}

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

#13
Hehe, the problem is FinnchDon don't have a simple time function....
function time()
{
    local t = date();
    return ::format(@"%.2d/%.2d/%d - %.2d:%.2d:%.2d", t.day, t.month, t.year, t.hour, t.min, t.sec);
}

else @Kusanagi I would like to request ya to post your time function
oh no

.

.