JackFarmer 526 Posted July 17, 2019 Report Share Posted July 17, 2019 1, AI walks from path note 1 to path node 2 to path node 3 2. Due to player's actions (using switches etc), path node 2 is not availably anymore (becuase it is maybe located on a trap door) 3. When path node 2 is not available anymore, AI shall go straight to path node 3 Quote Link to post Share on other sites
Springheel 4672 Posted July 18, 2019 Report Share Posted July 18, 2019 If I were doing this, I would just teleport Node 2 to Node 3 (or some other appropriate location) when the player "acts". Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
peter_spy 1615 Posted July 18, 2019 Report Share Posted July 18, 2019 (edited) My first idea would be to target 2 path coners, one would have chance 0, the second chance 1, and then make a script to reverse values of these spawnargs (not sure what's the specific script for that though). Edited July 18, 2019 by peter_spy Quote Misc. assets for TDM Link to post Share on other sites
VanishedOne 550 Posted July 18, 2019 Report Share Posted July 18, 2019 Changing node 1's target might also work. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
JackFarmer 526 Posted July 19, 2019 Author Report Share Posted July 19, 2019 Thank you for your answers. However, I have already tried to move the nodes through movers , teleporters or change_target entities. Nothing worked. Are you sure that one of these methods should work? Quote Link to post Share on other sites
Dragofer 1480 Posted July 19, 2019 Report Share Posted July 19, 2019 On 7/18/2019 at 5:02 PM, VanishedOne said: Changing node 1's target might also work. This is what I've used previously. You'd need to do it by clearing all targets, then adding a different target. There are entities for these 2 functions, or you can use Stim/Response or scripts. Personally I'd use a script so that you can add a sys.waitFrame() inbetween the 2 steps to ensure 100% that the new target doesn't become cleared as well. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Springheel 4672 Posted July 20, 2019 Report Share Posted July 20, 2019 2 hours ago, JackFarmer said: Thank you for your answers. However, I have already tried to move the nodes through movers , teleporters or change_target entities. Nothing worked. Are you sure that one of these methods should work? I just tried it in a testmap and it worked fine. Save the following as a .map file. The citywatch will patrol to three of the 4 corners. Flip the switch and one corner will be teleported so that he now only patrols to 2 corners. Version 2 // entity 0 { "classname" "worldspawn" "editor_drLastCameraPos" "0 0 0" "editor_drLastCameraAngle" "19.2 313.2 0" // primitive 0 { brushDef3 { ( 0 0 1 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 1 0 -96 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 5 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 5 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 -128 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 5 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 -144 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 5 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } // primitive 1 { brushDef3 { ( 0 0 1 -152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 1 0 -96 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 -144 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 88 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } // primitive 2 { brushDef3 { ( 0 0 1 -152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 1 0 -96 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 -128 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 4.583333015441895 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } // primitive 3 { brushDef3 { ( 0 1 0 -96 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 -128 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 -144 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 1 56 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } // primitive 4 { brushDef3 { ( 0 0 1 -152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 -160 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 -128 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 -144 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 1 0 120 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } // primitive 5 { brushDef3 { ( 0 0 1 -152 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 1 0 -96 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 0 -1 0 -128 ) ( ( 0.0520833320915699 0 63.375 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( -1 0 0 -144 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 ( 1 0 0 136 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 4.583333015441895 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0 } } } // entity 1 { "classname" "info_player_start" "name" "info_player_start_1" "origin" "-104 -96 -56" "angle" "90.000000" } // entity 2 { "classname" "path_corner" "name" "path_corner_1" "origin" "-112 64 -56" "target0" "path_corner_2" } // entity 3 { "classname" "path_corner" "name" "path_corner_2" "origin" "120 64 -56" "target0" "path_corner_3" } // entity 4 { "classname" "path_corner" "name" "path_corner_3" "origin" "120 -96 -56" "target0" "path_corner_1" } // entity 5 { "classname" "atdm:teleport" "name" "atdm_teleport_1" "origin" "96 -96 -56" "target0" "path_corner_2" } // entity 6 { "classname" "atdm:switch_flip" "name" "atdm_switch_flip_1" "origin" "-126.725 -24.9769 -16" "rotation" "0 -1 0 1 0 0 0 0 1" "rotate" "0 0 45" "target0" "atdm_teleport_1" } // entity 7 { "classname" "light" "name" "light_1" "origin" "8 -16 88" "light_center" "0 0 0" "light_radius" "320 320 320" } // entity 8 { "classname" "atdm:ai_citywatch" "name" "atdm_ai_citywatch_1" "origin" "-16 -96 -47.9446" "rotation" "1 0 0 0 1 0 0 0 1" "team" "0" "target0" "path_corner_1" } 1 Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
JackFarmer 526 Posted July 20, 2019 Author Report Share Posted July 20, 2019 8 hours ago, Springheel said: I just tried it in a testmap and it worked fine. Save the following as a .map file. The citywatch will patrol to three of the 4 corners. Flip the switch and one corner will be teleported so that he now only patrols to 2 corners. Yeah this works, but this is a one way solution. What I need is that the guard would resume his original route when using the switch once again (because, for example, through afresh flipping of the switch, the trap door closes and the area above it is accessable once again) Quote Link to post Share on other sites
Springheel 4672 Posted July 20, 2019 Report Share Posted July 20, 2019 3 hours ago, JackFarmer said: Yeah this works, but this is a one way solution. What I need is that the guard would resume his original route when using the switch once again (because, for example, through afresh flipping of the switch, the trap door closes and the area above it is accessable once again) You didn't mention that in your original request. That changes things. What I would try in that case is creating an invisible door entity below the map that slides "open" and closed" when triggered. The pathnode can be def_attached to the door entity, allowing it to move from one position to another. I can't confirm that the pathnode will slide through walls, but I don't see why it wouldn't. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
JackFarmer 526 Posted July 20, 2019 Author Report Share Posted July 20, 2019 4 minutes ago, Springheel said: You didn't mention that in your original request. That changes things. What I would try in that case is creating an invisible door entity below the map that slides "open" and closed" when triggered. The pathnode can be def_attached to the door entity, allowing it to move from one position to another. I can't confirm that the pathnode will slide through walls, but I don't see why it wouldn't. You are right, sorry; I forgot to mention that. I have already tried someting like that with the "bind" command. I will give this another try before I go public. Quote Link to post Share on other sites
Springheel 4672 Posted July 20, 2019 Report Share Posted July 20, 2019 You'd have to make sure the pathnode is resting on or close to the ground in both positions, but it should work. Bind is probably the correct method. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
JackFarmer 526 Posted July 20, 2019 Author Report Share Posted July 20, 2019 Hello Springheel, You are right, I have tried this once again and now it works as I always wanted it. Thank you very much for your help! I will adjust this for the two locations in question....and then I will post a release thread. Jack 2 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.