Jojash Posted April 5, 2013 Share Posted April 5, 2013 Is there a way to disable an NPC's collisions and package processing? I know that there's, "SetActorsAI", which can disable package processing, but it also disables pretty much everything else too. Any help would be greatly appreciated! Link to comment Share on other sites More sharing options...
llamaRCA Posted April 5, 2013 Share Posted April 5, 2013 Is there a way to disable an NPC's collisions and package processing? I know that there's, "SetActorsAI", which can disable package processing, but it also disables pretty much everything else too. Any help would be greatly appreciated!What are you trying to do with the NPC? I'm asking because a lot of us have tried to do various things with NPCs and have come up with various solutions to problems so telling us where you are trying to go might be a better place to start. Link to comment Share on other sites More sharing options...
Jojash Posted April 5, 2013 Author Share Posted April 5, 2013 (edited) Basically, I'm trying to allow the player to take control of an NPC, I'm doing this by constantly moving the NPC to the player's position and then allowing the player to move around. However, with this set-up, while you can control the NPC's movements, the camera is excessively jerky and at times it'll veer away from wherever you want to go. I'm assuming the jerkiness is caused by clipping between the player and the NPC or by the NPC and the terrain as the player moves, and I'm assuming that the veering is to do with the NPC trying to follow a package and take one route, while the player wants to go in a different direction. Edited April 5, 2013 by Jojash Link to comment Share on other sites More sharing options...
Jojash Posted April 9, 2013 Author Share Posted April 9, 2013 (edited) Sorry to bump, but I'm still having issues with this. I tried using the "tcl" command in-game to see if I was right about disabling collisions, and it seemed to work quite well. Is there any way of doing this in a script with the NPC? Let me clarify what I mean when I say that the camera is "jerky". When moving around and having the NPC move to the player, sometimes, when moving in particular directions, it will feel as though you are "running against the wind". I've since added "SetActrosAI to 0". However this has made no difference. Again, I'd be very grateful if anyone could offer any assistance. :) Here's the part of the script that is simulating the player controlling the NPC's movements. If RobotPossessed == 1 Set CDRobotPossessed to 1 If CDRobotCounter == 1 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot01a Elseif CDRobotCounter == 2 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot02a Elseif CDRobotCounter == 3 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot03a Elseif CDRobotCounter == 4 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot04a Elseif CDRobotCounter == 5 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot05a Elseif CDRobotCounter == 6 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot06a Elseif CDRobotCounter == 7 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot07a Elseif CDRobotCounter == 8 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot08a Elseif CDRobotCounter == 9 DisablePlayerControls 1 1 1 1 1 1 1 Set StartingPosition to Player.PlaceAtMe XMarker 1 Player.SetGhost 1 Set RobotPosition to Robot09a Endif Set RobotPossessed to 0 Endif If RobotPosition != 0 && PossessCounter < 1 Set RobotScale to RobotPosition.GetScale Set PlayerScale to Player.GetScale Player.SetScale RobotScale ApplyImageSpaceModifier CyberianDawnBifrostPossessionISFX RobotPosition.SetActorAlpha 0 Player.AddSpell CyberianDawnRobotPossessedEffect ShowMessage CyberianDawnBifrostPossessedMessage Set PossessCounter to 1 Endif If PossessCounter == 2 If IsKeyPressed CDMarkHotkey != 1 RobotPosition.SetActorsAI 0 Set PossessCounter to 3 EnablePlayerControls 1 0 0 0 1 0 0 Endif Endif If PossessCounter == 4 If IsKeyPressed CDMarkHotkey != 1 RobotPosition.SetActorsAI 1 Set PossessCounter to 1 DisablePlayerControls 1 1 1 1 1 1 1 Endif Endif If IsControlPressed 4 If PossessCounter == 3 Set RobotWeapon to RobotPosition.GetEquippedObject 5 RobotPosition.FireWeapon RobotWeapon Endif Endif If PossessCounter == 1 If RobotPosition.GetDead != 1 && ISMCounter != 1 If IsKeyPressed CDHackHotkey != 1 && IsKeyPressed CDMarkHotkey != 1 DisablePlayerControls 1 1 1 1 1 1 1 Player.StopCombatAlarmOnActor Set MovePosition to RobotPosition.GetPos X Player.SetPos X Moveposition Set MovePosition to RobotPosition.GetPos Y Player.SetPos Y Moveposition Set MovePosition to RobotPosition.GetPos Z Player.SetPos Z Moveposition Set RobotAngleX to RobotPosition.GetAngle X Set RobotAngleY to RobotPosition.GetAngle Y Set RobotAngleZ to RobotPosition.GetAngle Z Player.SetAngle X RobotAngleX Player.SetAngle Y RobotAngleY Player.SetAngle Z RobotAngleZ Elseif IsKeyPressed CDHackHotkey RobotPosition.SetActorAlpha 1 Player.Dispel CyberianDawnRobotPossessedEffect RemoveImageSpaceModifier CyberianDawnBifrostPossessionISFX Player.MoveTo StartingPosition StartingPosition.Disable StartingPosition.MarkForDelete Player.SetScale PlayerScale Player.SetGhost 0 EnablePlayerControls Set RobotPosition to 0 Set PossessCounter to 0 Set CDRobotPossessed to 0 Set HotKeyCounter to 0 Set ISMCounter to 0 Elseif IsKeyPressed CDMarkHotkey Set PossessCounter to 2 Endif Else RobotPosition.SetActorAlpha 1 Set Timer to 2 Set ISMCounter to 1 RemoveImageSpaceModifier CyberianDawnBifrostPossessionISFX ApplyImageSpaceModifier CyberianDawnBifrostSignalLostISFX Endif Endif If PossessCounter == 3 If RobotPosition.GetDead != 1 && ISMCounter != 1 If IsKeyPressed CDHackHotkey != 1 && IsKeyPressed CDMarkHotkey != 1 Player.StopCombatAlarmOnActor Set MovePosition to Player.GetPos X RobotPosition.SetPos X MovePosition Set MovePosition to Player.GetPos Y RobotPosition.SetPos Y MovePosition Set MovePosition to RobotPosition.GetPos Z Player.SetPos Z MovePosition Set RobotAngleX to RobotPosition.GetAngle X Set RobotAngleY to RobotPosition.GetAngle Y Set RobotAngleZ to RobotPosition.GetAngle Z Set PlayerAngleZ to Player.GetAngle Z RobotPosition.SetAngle Z PlayerAngleZ Elseif IsKeyPressed CDHackHotkey RobotPosition.SetActorAlpha 1 RobotPosition.SetActorsAI 1 Player.Dispel CyberianDawnRobotPossessedEffect RemoveImageSpaceModifier CyberianDawnBifrostPossessionISFX Player.MoveTo StartingPosition StartingPosition.Disable StartingPosition.MarkForDelete Player.SetScale PlayerScale Player.SetGhost 0 EnablePlayerControls Set RobotPosition to 0 Set PossessCounter to 0 Set CDRobotPossessed to 0 Set HotKeyCounter to 0 Set ISMCounter to 0 Elseif IsKeyPressed CDMarkHotkey Set PossessCounter to 4 Endif Else RobotPosition.SetActorAlpha 1 RobotPosition.SetActorsAI 1 Set Timer to 1 Set ISMCounter to 1 RemoveImageSpaceModifier CyberianDawnBifrostPossessionISFX ApplyImageSpaceModifier CyberianDawnBifrostSignalLostISFX Endif Endif If ISMCounter >= 1 If Timer == 0 ShowMessage CyberianDawnBifrostSignalLostMessage Player.Dispel CyberianDawnRobotPossessedEffect Player.MoveTo StartingPosition StartingPosition.Disable StartingPosition.MarkForDelete Player.SetScale PlayerScale Player.SetGhost 0 EnablePlayerControls Set RobotPosition to 0 Set PossessCounter to 0 Set CDRobotPossessed to 0 Set HotKeyCounter to 0 Set ISMCounter to 0 Else Set Timer to Timer - GetSecondsPassed Endif Endif Edited April 10, 2013 by Jojash Link to comment Share on other sites More sharing options...
Recommended Posts