Jump to content

MoveTo command breaking enemy collision?


Jarkon

Recommended Posts

Hi all! I'm working on a little quest mod that ends in a boss fight that teleports the actor around the arena, sort of like Oswald from Nuka World (I.E He fights the player normally then teleports somewhere else when he enters bleedout). However, I've begun to notice that whenever he teleports, he stops colliding with me. My character can walk straight through him, and his AI is even causing him to constantly be directly inside the player, which gets very annoying very quickly.

 

I've been teleporting him by using the MoveTo() command to move him to a random marker in the arena. I've tried calling it on the boss as both an actor and an object reference, though both yield the same result.

 

Does anyone have any idea what may cause this? Any ideas would be appreciated. If there are any questions you have about the scripts or the rest of the quest feel free to ask them

 

Thanks again!

Link to comment
Share on other sites

Ah sorry that's probably helpful haha. Here's the script attached to the boss himself:

 

 

 

Scriptname BossBasicTeleport extends Actor Const
ObjectReference[] Property teleportMarkers auto const
BossQuestScript Property linkedQuestScript auto const
Quest Property linkedQuest auto const
Event OnEnterBleedout()
linkedQuestScript.Teleport()
endEvent
That script links to the main quest script, which is pasted below:
Scriptname BossQuestScript extends Quest
ObjectReference Property Boss Auto Const
Int Property TeleportCounter = 0 Auto; Const
{How many times has the boss teleported?}
ObjectReference[] Property teleportMarkers Auto Const
{Markers to teleport the black soul to. In game these are flag markers)
Explosion Property teleportExplosion Auto Const
int random
actor bossActor
function Teleport ()
TeleportCounter += 1
bossActor = (Boss as Actor)
;Places an explosion where the boss is for a cool effect
bossActor.PlaceAtMe(teleportExplosion)
;Picks a random marker to teleport the boss to
random = Utility.RandomInt(0, MeleeTeleportMarkers .Length - 1)
;Move the boss to that marker (I've tried using the bossActor variable here, had the same result)
Boss.Moveto(teleportMarkers [random])
;Restore the boss health so when he teleports he's standing up
bossActor.Resurrect()
endFunction
This is pretty much everything that goes into teleporting him.
Edited by Jarkon
Link to comment
Share on other sites

Good idea, but unfortunately it didn't work. I also tried adding a small wait to the teleport but that didn't really work either. It's very strange. Before teleporting he's fine, but afterwards he simply doesn't collide with the player. Weapons still hit him and he collides with the environment, just not the player. Does anyone have any idea what could get him back on his feet quickly besides the resurrect command? I've noticed that when I use it in other situations it yeilds other weird results. Edited by Jarkon
Link to comment
Share on other sites

Good idea, but unfortunately it didn't work. I also tried adding a small wait to the teleport but that didn't really work either. It's very strange. Before teleporting he's fine, but afterwards he simply doesn't collide with the player. Weapons still hit him and he collides with the environment, just not the player. Does anyone have any idea what could get him back on his feet quickly besides the resurrect command? I've noticed that when I use it in other situations it yeilds other weird results.

 

The resurrect might be the problem. you could try restoreav and health to give back heath.

Link to comment
Share on other sites

 

Good idea, but unfortunately it didn't work. I also tried adding a small wait to the teleport but that didn't really work either. It's very strange. Before teleporting he's fine, but afterwards he simply doesn't collide with the player. Weapons still hit him and he collides with the environment, just not the player. Does anyone have any idea what could get him back on his feet quickly besides the resurrect command? I've noticed that when I use it in other situations it yeilds other weird results.

 

The resurrect might be the problem. you could try restoreav and health to give back heath.

 

Just gave that a try too. It definitely is resurrect, but trying the restoreav function doesn't make him get up after teleporting. I'm thinking I'll just destroy him then place a new one at the selected marker instead of going through all this

Link to comment
Share on other sites

 

Â

Good idea, but unfortunately it didn't work. I also tried adding a small wait to the teleport but that didn't really work either. It's very strange. Before teleporting he's fine, but afterwards he simply doesn't collide with the player. Weapons still hit him and he collides with the environment, just not the player. Does anyone have any idea what could get him back on his feet quickly besides the resurrect command? I've noticed that when I use it in other situations it yeilds other weird results.

The resurrect might be the problem. you could try restoreav and health to give back heath.

Â

Just gave that a try too. It definitely is resurrect, but trying the restoreav function doesn't make him get up after teleporting. I'm thinking I'll just destroy him then place a new one at the selected marker instead of going through all this

you could try actor.reset() actor.startcombat(playerref, true) then the move to.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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