OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rytuklis 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?
-
The answers to these and all of the questions you've asked recently can be found very quickly and easily by searching the forum (http://www.ofpec.com/forum/index.php?action=search). 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 (http://www.ofpec.com/forum/index.php?topic=20884.msg138790#msg138790).
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.
-
Well, i tried searching object on table but found nothing ... Those search results isnt even related to what i need to find..
-
Aren't they? Because the answer does involve setPos (http://www.ofpec.com/COMREF/index.php?action=details&id=313&game=All).
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 (http://www.ofpec.com/COMREF/index.php?action=details&id=86&game=All) 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 (http://www.ofpec.com/COMREF/index.php?action=details&id=293&game=All).
-
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
The advanced search option even lets you select only the OFP editing boards.
and
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 (http://www.ofpec.com/forum/index.php?topic=10194.0)
The opening post in that thread post says this:
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.
Those search results isnt even related to what i need to find..
Uh huh. :dry: