Author Topic: SCI0 - gEgo and barriers  (Read 580 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

SCI0 - gEgo and barriers
« 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/


Artificial Intelligence Competition

Offline Kawa

Re: SCI0 - gEgo and barriers
« Reply #1 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.

Offline Doan Sephim

Re: SCI0 - gEgo and barriers
« Reply #2 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


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.065 seconds with 23 queries.