Jump to content

How to get NPC's to use ladders that transport to the same cell


montybrad

Recommended Posts

Hi there,

one of the main exterior cells of my mod uses ladders to get up to or down from certain areas in the same cell. I have a castle with siege ladders that allow the player to get up onto the walls, its basically two ladders that are linked within the same cell and are stacked on top of one another. The problem is NPC's dont know how to use them. Ive seen them try when its relevant to do so I.E. I'm on top of the wall and their down below. Multiple times ive experiences NPC's attempting to use these "same cell ladders" to get to me or another enemy of theirs. They run up to it and active it, I hear the sound effect and they disappear but they dont appear at the opposite door marker (the other end of the ladder) they simply reappear at that same spot and usually try to use the ladder one or two more times before giving up on it.

 

Does anyone know how if possible to get NPC's to use the ladders and how?

 

Thanks for reading.

Link to comment
Share on other sites

Have a look here for an explanation of 'Subspaces', the solution to your problem.

 

Thank you wetblanket :)

Its been over a year since ive worked on it so I forgotten a lot. I set up subspaces already but apparently not correctly. Im assuming that I may need a subspace on the ground and on the upper balcony (I only set up ones on the balconies) that may be why they dont work properly. The balcony subspace does encapsulate the door markers but I do need to verify that they are recognized by the subspace. Ill be back after checking those out to post the result.

Link to comment
Share on other sites

Its not working. Subspaces only seem to work to tell the NPC to use the nearest door that leads out of the current exterior cell. Ladders that are linked directly together in the same cell dont work, npc's use the ladder, disappear then reappear at the same point then use the ladder again over and over. It works fine on the balcony of a house, the npc uses the door to go thru the house to get to the player on the ground. Tho now that i think of it they dont always come out of the house, they just wait inside the front door.

 

The tutorial doesnt go into much detail, its somewhat vague. What I'm trying to do may be outside of what the game was developed to do, there arent any ladders that lead to higher ground in the same cell. At least not that I can remember.

 

Does anyone have any idea how to make this work because i really like the idea and its fun but when the npc's cant figure it out it breaks the experience.

 

I may just abandon this and remove the four extra ladders Ive added to minimize then chase the player will see the enemies acting stupid "hey a ladder! how does it work? hmm to complicated for me." lol

 

Its one of the things the vanilla game is sorely missing: cant climb a ladder to get on the castle walls... really? Im ranting now lol I just really want to make this work and i cant figure it out!!

 

edit- This is weird but for some reason the ladder works in interior cells.

Edited by montybrad
Link to comment
Share on other sites

You might be able to make a trigzone activator combo. You might try to connect the pathgridding, then set a trigzone on the top and one on the bottom of the ladder. Place the ladder so that they only trigger the activators when trying to use the ladder.

 

Now just make a script with something like:

 

begin onActivate
  if getactionref != player
     set tele to getactionref
     tele.disable
     tele.moveto x,y,z
     tele.enable
  endif
end

 

 

You can look up tutorials on how to properly move npc's and creatures. I just used a bit from memory about the teleport/recall spell. I could be forgetting something, I'm on my linux partition right now. I would just set an actor at where you want to teleport to, then copy the x,y,z co-ordinates into the scripting. You might even run a gameMode block to disable the other ladder trigzone for a couple of seconds, so as to keep the npc from flashing up/down the ladder when a nockback hit or something happens. Or you could make it check for z rotation to make sure the actor is facing the ladder. Just make sure that if they teleport from the top, they don't "land" in the trigzone at the bottom (and vice versa).

 

These are just some ideas off the top of my head. No guaruntees are made that they would work, but it seems likely.

Link to comment
Share on other sites

I used a lot of same-cell ladders in a mod, both indoors and outdoors and they work well. Keep in mind though that NPCs will consider a subspace interior to be a different cell. Are the subspaces covering the entire floor area? Are they completely separating the two areas within the same cell? Are there pathgrids where you want the NPCs to go?
Link to comment
Share on other sites

I used a lot of same-cell ladders in a mod, both indoors and outdoors and they work well. Keep in mind though that NPCs will consider a subspace interior to be a different cell. Are the subspaces covering the entire floor area? Are they completely separating the two areas within the same cell? Are there pathgrids where you want the NPCs to go?

 

You got it to work on exterior cells? Thats encouraging. Im thinking there is something wrong with the custom worldspace Im using thats causing the issue. All the subspaces in my interior cells are working fine. I have two castles, one of which is in a custom worldspace and the second is a duplicate of the first, set in an interior cell. The interior cell version works fine, Its very weird. I set up every same-cell ladder with subspaces and Its great to have them functioning properly but the main castle exterior is still broken... it's a really important area, gotta fix this.

 

Thanks theuseless :) I may end up looking into a scripted fix... if it drives me crazy enough lol

Edited by montybrad
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...