Home   Help Search Login Register  

Author Topic: Replace Object so missions don't have to require Editor Addons (OBSOLETE)  (Read 2019 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
To make missions more accessible to the public, its a good idea to use as few addons as you can.  This script makes it easy to use Editor Addon objects, without requiring the addons.

From the comments in the script:

; *****************************************************
; ** JBOY_replace_object.sqs
; ** by JohnnyBoy
; **
; ** Replace one object with another object.  Used to place
; ** EditorUpdate objects without having to include the Editor Addon
; ** in your mission.  The replacment object will have the same dir and
; ** position as the object to replace.
; **
; ** example call: 
; **    [this, "FieldReporter", "ReporterDude"] exec "JBOY_replace_object.sqs";

; **
; ** Parameter 1: Object to replace.  I like barrel objects as place holders.
; ** Parameter 2: Object Type of new object to create.
; ** Parameter 3: Object name of new object, so you can reference this object
; **              in your other scripts.  Place your desired name in this variable
; **              instead of naming the placeholder object you placed in the editor.
; *****************************************************

In the attached sample mission I have placed 4 barrel objects, adjusted their azimuths, and put a call to this script in the barrel's init.  When you preview the mission you will not see 4 barrels.  Instead you will see Marian Quandt, the Field Reporter, a video camera on a tripod, and an Oil Pump.

I should have posted this a year ago... :-[
« Last Edit: 11 Dec 2008, 02:41:36 by Spooner »
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 Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
I'm sorry, but you can already place ArmA's hidden objects directly in the editor without requiring the server/players to have any specific addon. Just use SIX EditorUpdate addon while making the mission, which unlocks all that hidden content in the editor, but does not require the addon to play the mission.

Nevertheless, a good idea on its own, if there wasn't already a better system available to do this.
« Last Edit: 11 Dec 2008, 02:44:43 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Right on.  That is better.  My old way required you to know the name of the object, which was a pain to find.

I'm all for whatever is easiest.   :good:
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...