123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|399|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Activating Checkpoints 1 by 1.

Tue, 18 May 2010, 06:34
ShadowIce
Hi all. For some reason, this code is not letting me activate each checkpoint only once..

for some reason, it allows u to activate all the checkpoints at the same time infinitely,

no matter which 1 i hit 1st, and no matter how far apart they are..

i don't see what i'm doing wrong here..



Thanks!
Tue, 18 May 2010, 06:46
Jayenkai
You need to keep track of which checkpoint each player passes.

First off, give each checkpoint a value, ranging from 1 at the start, up to x at the end.

Next, set the player up with a player\Checkpoint=0 value.
When scanning for nearby checkpoints, only bother to check whenever "Checkpoint\Number = Player\Checkpoint + 1", and if it's nearby, pop up the checkpoint number on the player so that it then scans for the next one.

Basically, you're switching it from Checkpoint based lookups, to player based, instead.

And, don't forget to flip it back down to 0 when the player reaches the goal, so they can do more laps!

-=-=-
''Load, Next List!''
Tue, 18 May 2010, 06:56
ShadowIce
Um. I already have all that in the code.

I just need to know what is acting up in my code, and how to fix it.

Thanks!
Tue, 18 May 2010, 09:31
HoboBen
In Object_Checkpoint_Create, you're setting o\status = 1.

In CheckCheckpoints(), at case 2 you're resetting o\status = 1 again... Basically when you check each checkpoint there's no way that you're not going to get the PlaySound event happening... both infinitely and for every check point.

I think the solution is, in Object_Checkpoint_Create, set o\status = 0 and for case 2 in CheckCheckpoints(), comment out the line o\state = 1. That should get you on the right track!

-=-=-
blog | work | code | more code
Tue, 18 May 2010, 09:35
ShadowIce
right. i only want it to
activate once per checkpoint
Tue, 18 May 2010, 13:43
ShadowIce
FIXED!
Thu, 20 May 2010, 09:41
Erebel55
Awesome hope you stick around the forums.
Sat, 22 May 2010, 07:50
ShadowIce
will do!