FindEntity Not WOrking

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Darsithis
Posts: 51
Joined: Wed Jul 24, 2013 6:31 pm

Re: FindEntity Not WOrking

Post by Darsithis »

Leki wrote:There is nothing like patrol in entities, as you can see here: http://www.grimrock.net/modding/asset-d ... reference/
Patrol is only some kind of tricky monster group manager. Try for example to write script like: for each entities in cell, if monster, setPosition to x+1, y+1. It will split the patrol into 4 skeletons, each in one cell, but they will move all in the same way. There in one "leading" monster, who has AI and collision (you can go through 3 of them freely now) and rest of the group are only puppets, until the lead monster dies etc. So no, you cannot work with patrol. It's only some kind of hack.
If you wanna open the door, when patrol is dead, you can do it in many ways. Without clone monsters and let me say easiest way is:
- you can add monster blocker in front of room with patrol and doors, to keep patrol of monsters in area (and monsters from dungeon out of the room
- on entrance into room add invisible once party trigger plate and start that one, or two or three sec timer
- timer will run script each sec or two or three, depends how intense interval you want
- in script just set local m = 4, theh do entitiesAt(level, x, y) over all cells in room (make array for x and y, where cells can be defined)
- if entity.class = "Monster", local m = m - 1
- after cell loop do if m = 0 open door and deactivate timer, else m = 4
But depends what you want to achieve and how complex your room is etc.
That's a lot of great info - thank you. For now I'm not going to get that complex and I settled for just killing a few single skeletons. After a quick playthrough I found that the gear & levels weren't enough to survive two patrols at once yet. Still need to tweak the dungeon!
Post Reply