Community

SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on May 25, 2022, 09:26:10 AM

Title: SCI0 - gEgo and barriers
Post by: Doan Sephim on May 25, 2022, 09:26:10 AM
Does anyone know where to look to find the programming controlling when gEgo hits a barrier? I find it curious that when gEgo hits a barrier and stops that the command to continue in that direction (say if the barrier is removed) is still active. I would think that movement would be set to null upon hitting a barrier and I'd like to implement this.

So, can anyone point me in the right direction and/or explain any potential problems of implementing such a change/
Title: Re: SCI0 - gEgo and barriers
Post by: Kawa on May 25, 2022, 10:24:48 AM
Going by the later StopWalk's doit, it checks (if (client isStopped:). That's available in the SCI0 template as well, and checks if the actor's mover actually moved. So if you want to detect walking into a barrier, that's how you might do it.
Title: Re: SCI0 - gEgo and barriers
Post by: Doan Sephim on May 25, 2022, 10:56:27 AM
Going by the later StopWalk's doit, it checks (if (client isStopped:). That's available in the SCI0 template as well, and checks if the actor's mover actually moved. So if you want to detect walking into a barrier, that's how you might do it.
Seems easy enough. I just added "gEgo setMotion: NULL" to trigger from that if statement and that does the trick. Thanks