![]() |
|
[Release] player checkpoints - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Release] player checkpoints (/Thread-Release-player-checkpoints.html) Pages:
1
2
|
player checkpoints - iAegle - 10-01-2011 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
}RE: player checkpoints - Nekochan - 10-01-2011 Omg nice its like SP ? EDIT: WTF thanks for idea (gametype for my mod :3) RE: player checkpoints - iAegle - 10-01-2011 (10-01-2011, 10:08)Se7en Wrote: Omg nice dunno what you mean but I normally use it to block something untill he has its checkpoint... Code: while( !playerCheckpoint( "thing" ) )
wait .05;RE: player checkpoints - Pozzuh - 10-01-2011 Why is this useful? Its much easier to just do self.shit = "bla"; .. now you have to use the function.. hmm RE: player checkpoints - iAegle - 10-01-2011 (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 RE: player checkpoints - Pozzuh - 10-01-2011 Well, yes. :umad: RE: player checkpoints - Rendflex - 10-01-2011 (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. RE: player checkpoints - rotceh_dnih - 10-01-2011 cool not bad RE: player checkpoints - Gladio - 10-01-2011 (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. RE: player checkpoints - Pozzuh - 10-02-2011 (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 but you don't need functions for that, you could just do checkpoint1 = (0,0,0); |