Home   Help Search Login Register  

Author Topic: How do i put enemies in buildings?  (Read 2028 times)

0 Members and 1 Guest are viewing this topic.

Offline DjTano

  • Members
  • *
How do i put enemies in buildings?
« on: 31 May 2007, 00:22:46 »
Hey guys,

ive once seen a thread about a VERY simple way to do that, but ive lost it now so can anybody tell me how to put enemies in buildings?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: How do i put enemies in buildings?
« Reply #1 on: 31 May 2007, 00:23:51 »

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: How do i put enemies in buildings?
« Reply #2 on: 31 May 2007, 04:30:16 »
I understand your frustration, i even made a blooper reel about this problem, check it out:

http://www.youtube.com/watch?v=FkqBywbOEIk

But the answer is, put this line in the initialization line for a unit (and buildings can have way more just one position,)

this setpos (nearestBuilding this buildingPos 1)

Offline DjTano

  • Members
  • *
Re: How do i put enemies in buildings?
« Reply #3 on: 31 May 2007, 20:29:24 »
Quote
this setpos (nearestBuilding this buildingPos 1)

when i use that i land in a corner of the island on the sea... wtf?

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: How do i put enemies in buildings?
« Reply #4 on: 31 May 2007, 21:25:49 »
strange.  did you put the enemy unit on top of the building on the map?  Also you pressed F1 to create an enemy soldier, then in the initialization line put

this setpos (nearestBuilding this buildingPos 1)

right?  worked for me.  try searching the forums i think i asked this question a while back and its in there.

Offline smoke52

  • Members
  • *
Re: How do i put enemies in buildings?
« Reply #5 on: 02 Jun 2007, 01:20:21 »
what i use is this:

this setpos [getpos this select 0, getpos this select 1, XXX]

where XXX is the height. for example:

this setpos [getpos this select 0, getpos this select 1, 4]

works everytime.

Offline DjTano

  • Members
  • *
Re: How do i put enemies in buildings?
« Reply #6 on: 02 Jun 2007, 18:08:18 »
tried tht aswell, and it doesnt work :(

Offline smoke52

  • Members
  • *
Re: How do i put enemies in buildings?
« Reply #7 on: 03 Jun 2007, 01:26:32 »
how and what are you placing?

put a soldier in the building, then in the soldiers INIT field put the command
Code: [Select]
this setpos [getpos this select 0, getpos this select 1, 4]
*you have to use some trial and error for the height, its not always 4

you could also just put the soldier out in the open, put your player looking at the soldier then preview it... you should see the soldier fall to the ground.

also i forgot where i downloaded this from but heres some scripts that places the guy randomly in the building, and another to place a random patrol in the building...all you have to do is place a soldier near any building and it will automatically jump the guy in the building and he will start patrolling, or just be randomly placed.

scripts:
http://download.yousendit.com/FAF10ACF6E4D98D9
« Last Edit: 03 Jun 2007, 01:30:56 by smoke52 »

Offline DjTano

  • Members
  • *
Re: How do i put enemies in buildings?
« Reply #8 on: 03 Jun 2007, 03:53:19 »
yea, i found a solution to it...

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: How do i put enemies in buildings?
« Reply #9 on: 04 Jun 2007, 16:51:27 »
Post your solution! Share and enjoy!
urp!