Chade on 23/4/2008 at 03:48
Hi All,
This is a problem I tried to solve (ages ago) with DromEd, and I could never work out a satisfactory solution. I'm curious if it can be done with T3Ed, because I think that combined with dynamic lighting this could be a pretty cool game mechanic.
I would like a way to create monsters which "see in the dark" and don't see in the light (their eyesight is inverted with respect to shadow/light). Just as importantly, these monsters need to co-exist with monsters with normal vision. The idea is that the player will never be entirely safe: if he is hidden from view of one set of monsters, we will be in full view of the other set, and visa versa.
When I tried to implement this in DromEd, I tried to create an invisible object which would follow the player avatar around, and it's visibility would be inverted. One class of monsters would be neutral to Garrett, but would attack the object, an the other class of monsters would be neutral to the object, but would attack Garrett. From memory, I got all of this working (but don't quote me on that!), but couldn't stop the monsters from attacking each other.
Of course, there are many other potential ways of implementing this, and I never got my way working, so it may not be the best approach!
Can anyone think of some potential ways to do this in T3Ed?
Flux on 23/4/2008 at 07:33
I'm trying to make somewhat similar in my next mission, it works up to now. Not in the way you're implementing. I'm just making ai go blind/see more after some set of actions.
I can suggest something for your case. Though depending the complexity of your map and in which areas this special monster will be, it can be tedious to make what you want.
There is visual acuity property under ai sensory. By default it is 1. If it is set to 0, the ai won't see you but can hear you because its audio acuity is also set to 1. If this visual acuity property is set to something very high, like 10 or more, the ai can see you in the dark.
So, you have to create volumes, lots of. Both for dark areas and lit areas. When that monster is in dark area, trigger its visual acuity to high values. When in light areas, lower it. This is when its patrolling. If it stays put, then you should also create a set of volumes for the player, with the same trick. (When player reaches this volume, change the visual acuity on linked ai etc...)
I don't remember exactly now, but the script on each volume will be simple. Something like " When ai reaches/in volume, set the property visual acuity 1-10" etc...
Stopping the monsters from attacking each other is all about faction status. By default with what I suggested, all monster will team up and attack player only, not each other. There is also script action to override each ai's faction status.(the ones starting with change disposition, under ai in scripts) Like, after something happens one of the monsters can guard the player and attack the rest of the monsters or vice versa...
If volumes don't seem right for you, check out and mess with the sensory model under meta property and create a new sensory model archetype and give this to your monster. There are tons of properties under sensory model, good luck with that.:p
Bardic on 23/4/2008 at 17:08
I don't know about Dromed, but using Flux's idea is great in T3ed and can be even simpler. Regular AI see Garrett in the light so nothing needs to be done to them.
For one thing volumes can have trigger scripts attached when you enter it and when you exit it. So you don't need to make volumes for light areas and shadowy areas, you can just do it for light areas (light areas created by torches should be linked to the torch with a script that disables the volume if the torch is put out).
Create your volumes, link each volume to the non-normal AI, and create the scripts something like:
when volume is breached by [player], set value [visial acuity] on linked object to [10]
reset scripts
and
when volume is exited by [player], set value [visial acuity] on linked objects to [0]
reset scripts
The only issue this doesn't cover is when Garrett is in shadow, while the monster is in the light, Garrett would be visible (which may be intended). For that you would have to have a lot of individual links to the monsters, so you don't have one monster enter the light and blind all the others at the same time.
Of course, all this is moot if there is a way to inversely link the acuity to the light gem for certain AI, but I don't know if there is.
Chade on 23/4/2008 at 22:19
Quote Posted by Bardic
The only issue this doesn't cover is when Garrett is in shadow, while the monster is in the light, Garrett would be visible (which may be intended).
Yeah, that is what I want.
Interesting ideas, guys ... when I next get a chance to use T3Ed I'll do some playing around.
Thanks. :)