Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release player checkpoints
#1
You can use this to set checkpoints and see if he completed that one already
Code:
playerCheckpoint( name )
{
    return( isDefined( self.Checkpoints[ name ] ) );
}

getPlayerCheckpoint( name )
{
    if( !isDefined( self.Checkpoints[ name ] ) )
        return undefined;
        
    return self.Checkpoints[ name ];
}

setPlayerCheckpoint( name, arg )
{
    if( !isDefined( self.Checkpoints ) )
        self.Checkpoints = [];
    
    if( !isDefined( arg ) )
        arg = true;
    
    self.Checkpoints[ name ] = arg;
}

clearPlayerCheckpoint( name )
{
    self.Checkpoints[ name ] = undefined;
}


here's an example
Code:
thing()
{
    self setPlayerCheckpoint( "thing" );
    
    while( playerCheckpoint( "thing" ) )
    {
        if( randomInt( 250 ) < 25 )
            self clearPlayerCheckpoint( "thing" );
            
        wait 1;
    }
    
    // blablabla
}
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#2
Omg nice
its like SP ?
EDIT: WTF thanks for idea (gametype for my mod :3)
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(10-01-2011, 10:08)Se7en Wrote: Omg nice
its like SP ?

dunno what you mean but I normally use it to block something untill he has its checkpoint...

Code:
while( !playerCheckpoint( "thing" ) )
wait .05;
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm
[Image: MaEIQ.png]
Reply

#5
(10-01-2011, 10:11)Pozzuh Wrote: Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm

like the shit you posted is usefull
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#6
Well, yes.

:umad:
[Image: MaEIQ.png]
Reply

#7
(10-01-2011, 10:11)Pozzuh Wrote: Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm

This.


(10-01-2011, 10:12)iAegle Wrote: like the shit you posted is usefull

Also this.
Reply

#8
cool not bad
Reply

#9
(10-01-2011, 10:11)Pozzuh Wrote: Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm

If you wanna make custom gametype like "race" (funny gametype from HALO) you need checkpoint, can be for example flag.

My sugestion is make race mod, when a player reach point can spawn maybe weapon or bonus perk, like old school, add spawning weapon like when using quantum device in moon map but only after grab flag.
Reply

#10
(10-01-2011, 17:34)Gladio Wrote:
(10-01-2011, 10:11)Pozzuh Wrote: Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm

If you wanna make custom gametype like "race" (funny gametype from HALO) you need checkpoint, can be for example flag.

My sugestion is make race mod, when a player reach point can spawn maybe weapon or bonus perk, like old school, add spawning weapon like when using quantum device in moon map but only after grab flag.

but you don't need functions for that, you could just do checkpoint1 = (0,0,0);
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 5,467 11-07-2013, 13:41
Last Post: Nekochan
  Player can write Fl0w_.JACKDAN 2 3,125 09-19-2013, 16:36
Last Post: Fl0w_.JACKDAN
  [CoD 4] Trying to set a player -- DidUknowiPwn 7 5,311 07-03-2013, 21:58
Last Post: Pozzuh
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 80,432 07-01-2013, 15:12
Last Post: explosivebanana55
Video Preview AIZombies eXtreme 2.0 / Zombie Player (Music Player) DidUknowiPwn 4 5,450 06-24-2013, 16:37
Last Post: DidUknowiPwn
  "VEH_LinkCommonChecks: Player already has an owner" - After long games akillj 4 3,240 06-07-2013, 11:38
Last Post: akillj
  Question on how to "Spawn" a flying rocket as a player? akillj 8 5,096 06-04-2013, 01:54
Last Post: rotceh_dnih
  Using Cheat Engine with Zombies Single Player kikkawa 3 10,262 06-03-2013, 01:18
Last Post: kikkawa
  [Request] Random player model hillbilly 1 2,561 05-12-2013, 08:30
Last Post: archit
Brick [Release] MW3 Single Player CONSOLE v1.9.433 can1907 13 26,822 05-01-2013, 15:18
Last Post: vton

Forum Jump:


Users browsing this thread:
1 Guest(s)

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