Jarkon Posted August 25, 2017 Share Posted August 25, 2017 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 More sharing options...
cypher2012 Posted August 25, 2017 Share Posted August 25, 2017 That's pretty strange hey! Care to share some code so we can have a look? Really don't know what could cause it, but maybe we could spot something in the code :) Link to comment Share on other sites More sharing options...
Jarkon Posted August 25, 2017 Author Share Posted August 25, 2017 (edited) 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 constBossQuestScript Property linkedQuestScript auto constQuest 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 effectbossActor.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 upbossActor.Resurrect() endFunction This is pretty much everything that goes into teleporting him. Edited August 25, 2017 by Jarkon Link to comment Share on other sites More sharing options...
shavkacagarikia Posted August 25, 2017 Share Posted August 25, 2017 Can you try and call resurrect first and then moveto? Link to comment Share on other sites More sharing options...
Jarkon Posted August 25, 2017 Author Share Posted August 25, 2017 (edited) 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 August 25, 2017 by Jarkon Link to comment Share on other sites More sharing options...
JonathanOstrus Posted August 26, 2017 Share Posted August 26, 2017 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 More sharing options...
Jarkon Posted August 26, 2017 Author Share Posted August 26, 2017 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 More sharing options...
JonathanOstrus Posted August 26, 2017 Share Posted August 26, 2017  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 thisyou could try actor.reset() actor.startcombat(playerref, true) then the move to. Link to comment Share on other sites More sharing options...
Jarkon Posted August 26, 2017 Author Share Posted August 26, 2017 That did it! Great idea! Thanks so much for the help! Link to comment Share on other sites More sharing options...
Recommended Posts