Home   Help Search Login Register  

Author Topic: Placing enemy in building and choosing which floor they are on??  (Read 1657 times)

0 Members and 1 Guest are viewing this topic.

Offline Crowey

  • Members
  • *
Hi guys as you read from the topic im in need of help???? Basically i need to place a enemy officer in the 2nd floor of a building as he is the target for the good guys to kill so I want him to be out of sight so its not just a case of sniping him from miles away.... also i wanna put his body guards on the ground floor for a bit of close quarters action..... only thing is when i place him he always is on ground floor???
PS, may need a script to make him stay in situ....

Offline trooper543

  • Members
  • *
Hi Crowley

Mate i can understand your fraustration

1. The best thing to do mate is have a look at Mr Murrays Editing Guide as this helps out loads and also gives you a better understanding

2. As for answering your question mate, i think if you give the bloke a waypoint that moves him into the building you will notice that within the waypoint it will ask you what postion in the building you want to place the enemy officer

i hope i have explained this okay

Mate i know where you coming from but also try Mr Murrays Editing Guide this is really a big help


Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Guess and check with setpos is what I normally do to get him right where I want him.
TS3 IP: tor.zebgames.com:9992

Offline Rommel92

  • Members
  • *
Use my positions recorder (check Submissions forum). Record all the positions you want them to be at, in the editor set their direction to what you want. Then with those positions just put them in a big setPos script moving them all to those positions. Done!  :good:

Offline Crowey

  • Members
  • *
Hmmm cant find that and when I try the way point, no matter what position i choose the unit just stands outside the door and wont enter?

Offline Cheetah

  • Former Staff
  • ****
The buildingPos command might help to setPos a unit.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Rommel92

  • Members
  • *
ROMM_RecordPos:
http://www.ofpec.com/ed_depot/index.php?action=details&id=548&page=1&cat=xyz

Waypoint Q: Is the unit in a group? Groups tend to have trouble moving into buildings, as they retain their formation. If this isn't the case however, is there anything stopping him from entering? Is it a custom building or a BIS one (ie the Hotel?)

The buildingPos as suggested by Cheetah helps a lot aswell, and you can tell units via a "doMove" to move to these found building positions, however, if it he won't go in by default, you may have some trouble with this.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
You can look up object IDs for the buildings using the editor. Then give the unit a TALK waypoint, and put this code in it:

Code: [Select]
this domove ((position this nearestobject 259904) buildingpos 10);
The unit should then move to the position in the building (including second floor positions).  Note there a re a few buildings where AI get stuck (like the tall apartment buildings in Bagango).  The AI cannot access the upper floors of those buildings for some reason.  Also note that when using code, the building positions are start with zero, but when you are playing and ordering units into buildings (so the building position # is shown to you while playing) the position #s start with one.  So if while play testing you see position 11 is the position you want, then you make the line of code above 10.

The other technique already mentioned is a simple SETPOS command, where you set the height (the z coordiante to the exact height above ground that you want to place the unit).  You can put a unit anywhere using this command.  This is how El Cojon stood on top of a Lamp Post (right before he lost his left jewel...poor guy...check out my Last Tango in Bagango mission if you don't know what I'm talking about).   ;)

Code: [Select]
unit1 setpos [x, y, z];
Rommel's tool for capturing coordinates is very handy.  You should download it and use it.  Saves hand writing coordinates.  You can copy coordinates from his tool, and then paste them into an editor, and then paste them into your mission code later.

If this is all still a bit overwhelming, I can make a small example mission for you using the move to buildingPos technique, the setpos technique, or both.  Just tell me exactly which building in which town.

You can zoom in the map and put a marker on the building then take a screenshot and post it here (and state which town its in).

Finally, you want these units to stay put, so the player has to hunt them, so you may want the following commands to keep them in their places:

Code: [Select]
doStop Unit1;
unit1 disableAI "MOVE";
unit1 setUnitPos "UP';   <-- use this if you don't want unit to go prone when they sense danger.

And most importantly, have fun!
« Last Edit: 05 Jun 2008, 02:44:52 by johnnyboy »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline schuler

  • Contributing Member
  • **
hey you all are right ,,, but this works too! i think! or help others out  ;)
note set behavior and setpos must be right ,,, and direction if you need.
cheers schuler,,,, might not have answered this question but might help others!!!!!
« Last Edit: 04 Jun 2008, 14:00:30 by schuler »
Semper Fi