jandrews 116 Posted November 7, 2013 Hello, I have found a nice way to build bases and such with this code... INIT of the Helipad: wokka= "Land_Airport_Tower_F" createVehicle position this; deleteVehicle this; this link will help you with building class names and pictures. My question is.... other than modules using "site" and "base" or whatever you like to fill this newly spawned base/buildings, I am trying to get AI units to move into these "spawned" buildings with waypoints. I have tried buildingPos, spawning AI units in the buildings however since they are spawned in, its difficult to place correctly, there are no ID markers since its spawned in....So I am at a holding point. Ideas? Thanks in advance. Share this post Link to post Share on other sites
barbolani 198 Posted November 7, 2013 Have you tried this? http://community.bistudio.com/wiki/setWaypointHousePosition Share this post Link to post Share on other sites
jandrews 116 Posted November 7, 2013 Have you tried this?http://community.bistudio.com/wiki/setWaypointHousePosition I haven't tried that one. Thanks I will give it a go. Share this post Link to post Share on other sites
jandrews 116 Posted November 8, 2013 Have you tried this?http://community.bistudio.com/wiki/setWaypointHousePosition didn't work. bummer. anyone else have any ideas how to do this? Share this post Link to post Share on other sites
iceman77 19 Posted November 8, 2013 (edited) You've tried something like this? _house = createVehicle ["Land_Airport_Tower_F", getPos [color=#ff0000]myPos[/color], [], 0, "CAN_COLLIDE"]; [color=#ff0000]_grp[/color] = [getPos [color=#ff0000]mySpawnPos[/color], WEST, (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfTeam")] call BIS_fnc_spawnGroup; sleep 1; _wp = [color=#ff0000]_grp[/color] addWaypoint [getPos [color=#ff0000]_house[/color], 0]; _wp setWaypointType "MOVE"; _wp setWaypointStatements ["true", ""]; _wp setWaypointCombatMode "blue"; _wp setWaypointBehaviour "Aware"; [color=#008000]_wp setWaypointHousePosition 1;[/color] Edited November 8, 2013 by Iceman77 Share this post Link to post Share on other sites
jandrews 116 Posted November 8, 2013 You've tried something like this? _house = createVehicle ["Land_Airport_Tower_F", getPos [color=#ff0000]myPos[/color], [], 0, "CAN_COLLIDE"]; [color=#ff0000]_grp[/color] = [getPos [color=#ff0000]mySpawnPos[/color], WEST, (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfTeam")] call BIS_fnc_spawnGroup; sleep 1; _wp = [color=#ff0000]_grp[/color] addWaypoint [getPos [color=#ff0000]_house[/color], 0]; _wp setWaypointType "MOVE"; _wp setWaypointStatements ["true", ""]; _wp setWaypointCombatMode "blue"; _wp setWaypointBehaviour "Aware"; [color=#008000]_wp setWaypointHousePosition 1;[/color] does this go into the Act box on waypoint? I can try it when I get home. thanks for your help Share this post Link to post Share on other sites
barbolani 198 Posted November 12, 2013 Hello, I have interest on this. Andrews, you better use this in a script or on act of a trigger. Did it work? I suppose yes. Iceman, what about existing buildings. For example, I want scriped waypoints for several units in different groups on the same building, so doing it via editor would be extremely messy. So if this method Works, Placing a logic in the building, creating a waypoint position logic, and setWaypointHousePosition could be the solution. Thanks in advance Share this post Link to post Share on other sites
jandrews 116 Posted November 18, 2013 I tried this code in waypoint Act line and it said variable error. However, when messing around with my newly spawned HQ, I placed unit waypoint directly over object to "get in" and every time he enters the HQ like he knows what he is suppose to do. weird. Share this post Link to post Share on other sites
f2k sel 164 Posted November 18, 2013 I did a little testing and the code seems to be missing the last line. _wp waypointAttachObject _house; Share this post Link to post Share on other sites
jandrews 116 Posted November 18, 2013 (edited) Ok, so is this the way it should look? (below) Now I presume I can change "Land_Airport_Tower_F", "West" "BLU_F", I guess I was going to use team leader or officer and combatmode color, all going in Act line of waypoint? thanks for your efforts too guys. This stuff is about my pay grade. _house = createVehicle ["Land_Airport_Tower_F", getPos myPos, [], 0, "CAN_COLLIDE"]; _grp = [getPos mySpawnPos, WEST, (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfTeam")] call BIS_fnc_spawnGroup; sleep 1; _wp = _grp addWaypoint [getPos _house, 0]; _wp setWaypointType "MOVE"; _wp setWaypointStatements ["true", ""]; _wp setWaypointCombatMode "blue"; _wp setWaypointBehaviour "Aware"; _wp setWaypointHousePosition 1; _wp waypointAttachObject _house; I wanted to change it to an AAF officer. EAST, WEST, ?? what are the AAF? Edited November 19, 2013 by JAndrews1 Share this post Link to post Share on other sites
jandrews 116 Posted December 6, 2013 I am experiencing a weird thing. While spawning in New buildings, my AI are shooting at these buildings, I cannot figure out why or how to avoid this. Is there a script I can place in the buildings init box to make them friendly to opfor? I just need opfor to stop blowing these buildings up. they are mostly the HQ, cargo house/patrol buildings. Any help is grateful. this is really a pain in the azz. Share this post Link to post Share on other sites
semiconductor 309 Posted December 6, 2013 Oops, please ignore that post. Share this post Link to post Share on other sites