What does Brain's "lastSeen" value mean? Its a decimal

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

What does Brain's "lastSeen" value mean? Its a decimal

Post by MrChoke »

As I now focus fully on AI stuff, I see the brain component has a read-only value you can get called "lastSeen". I get its value and its a decimal number, not what I was hoping and that was an (X,Y) coordinate. I get values like this from it:
1567.34334455672

Does anybody know what this means? I wish it was (X, Y) of where he last saw the party.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: What does Brain's "lastSeen" value mean? Its a decimal

Post by minmay »

It's the time at which the party was last seen.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: What does Brain's "lastSeen" value mean? Its a decimal

Post by MrChoke »

minmay wrote:It's the time at which the party was last seen.
Yup, that's it. Its the seconds in game time since the game started though, so the number is not reset to zero. It is always increasing if the party is seen. Thanks!
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: What does Brain's "lastSeen" value mean? Its a decimal

Post by minmay »

Why would you want it reset to 0? This way you can compare it to Time.currentTime().
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: What does Brain's "lastSeen" value mean? Its a decimal

Post by MrChoke »

minmay wrote:Why would you want it reset to 0? This way you can compare it to Time.currentTime().
I don't. What it gives is fine.

I know its a little off topic but I am noticing "seenParty" doesn't work quite right sometimes. It gets set to true at times when there is a wall between me and the mob. It goes back to false again shortly after though. I am still trying to figure out why its doing that.
Post Reply