Home   Help Search Login Register  

Author Topic: Question regarding objects  (Read 1780 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
Question regarding objects
« on: 19 Jun 2011, 22:09:44 »
Hey, i have a question once again. How do i make a unit to spawn INSIDE the house for example in the room?
and another:

I spawn radio and the table, how do i put radio on the table?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Question regarding objects
« Reply #1 on: 20 Jun 2011, 08:34:57 »
The answers to these and all of the questions you've asked recently can be found very quickly and easily by searching the forum. The advanced search option even lets you select only the OFP editing boards.

For example, a quick search for "spawn inside building" reveals this thread.

Your turn: try searching for "object on table" and read the third thread in the result list.

OFPEC is here to help you, but you need to help yourself first.

Offline Rytuklis

  • Members
  • *
Re: Question regarding objects
« Reply #2 on: 20 Jun 2011, 09:31:30 »
Well, i tried searching object on table but found nothing ... Those search results isnt even related to what i need to find..

Walter_E_Kurtz

  • Guest
Re: Question regarding objects
« Reply #3 on: 20 Jun 2011, 13:50:02 »
Aren't they? Because the answer does involve setPos.

As an aside, are you sure you need to spawn these objects? It would be much easier to place them in the mission editor - then they'd need only to be setPos'd one above the other, and you could easily change their orientation.


Step 0
   Know where the table will be, either its position OR place something invisible. For this illustration that will be a marker called table_point.

Step 1
   Generate the table.
         table1 = "Table" createVehicle getMarkerPos "table_point"

Step 2
   Generate the radio.
         wasteofspace = "Radio" createVehicle getMarkerPos "table_point"

Step 3
   Position the radio atop the table. The third entry in the array is what raises it off the ground.
         wasteofspace setPos [(getPos table1) select 0, (getPos table1) select 1, ((getPos table1) select 2) + 1]


If you need to rotate them, use setDir.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Question regarding objects
« Reply #4 on: 20 Jun 2011, 23:58:52 »
Okay. Here's what I did:
  • I imagined I am a noob to editing with questions
  • I read bedges' post above, specifically the bits that say
Quote
The advanced search option even lets you select only the OFP editing boards.
and
Quote
try searching for "object on table" and read the third thread in the result list.
  • I clicked on the SEARCH button
  • I typed "object on table" in the searchbox
  • I expanded the bit that says Choose a board to search in, or search all
  • I clicked the checkbox that says Check all to clear all the other checkboxes
  • I clicked the checkbox that says OFP - Editing/Scripting General
  • I clicked the Search button
  • I clicked on the third thread in the list of results, which takes me to this thread

The opening post in that thread post says this:

Quote
How do I place an object (like a telephone, computer, or radio) on top of a table.

The second post in that thread has the answer.

* * *

Now, I have just spent the best part of 10 minutes doing all that and typing it here. I do not consider it a waste of time though, because if it makes clear to you that the answers are all there - especially to such basic questions as the ones you've been asking - and if it shows you just how simple it is to find the answers, then maybe you'll stop wasting your time - and ours - by expecting us to lay these answers in front of you when they've been answered many times before.

Quote
Those search results isnt even related to what i need to find..

Uh huh.  :dry: