Home   Help Search Login Register  

Author Topic: using custom made addons in your mission  (Read 763 times)

0 Members and 1 Guest are viewing this topic.

mischa

  • Guest
using custom made addons in your mission
« on: 11 Jan 2004, 17:00:19 »
hi there

is it possible to use an addon e.g. kegetys hawk (airplane) in a mission, but if the player has not the addon it will be replaced by a standard (in ofp included) a-10? i do not want to use this but i just were wondering if it was possible

thx for any replies  ::)

Unnamed

  • Guest
Re:using custom made addons in your mission
« Reply #1 on: 11 Jan 2004, 17:23:18 »
Yes, but you would have to use CreateVehicle to add it to your mission.

Basicly if you use CreateVehicle on a non-exsistent type (An Addon someone does not have) it will return a null object.

So you would say something like:

_TheJet=("AnotherJet" createVehicle [0,0,0])

If (IsNull(_TheJet)) Then {_TheJet=("A10" createVehicle [0,0,0])}

Just put in a position that suits your mission and make sure your mission.sqm does not have any reference to the Addon, otherwise anyone who does not have it wont even be able to load your mission.

Also anytime you run and save your mission in the editior, I think it will add a reference to the addon. So remember to check the mission.sqm before you distribute your mission.

Dont know how this will work in multiplayer when the server has the addon but the client does not?
« Last Edit: 11 Jan 2004, 17:30:41 by Unnamed »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:using custom made addons in your mission
« Reply #2 on: 11 Jan 2004, 20:42:36 »
@ Unnamed

it realy works ?

wont it start givin u eror msgs bout dat - dat da addon is not in da list - if u create it but its not included in da SQM ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:using custom made addons in your mission
« Reply #3 on: 11 Jan 2004, 23:16:46 »
I would imagine that ppl having installed the addons
would suddenly see two different vehicles then.

Ya know: createVehicle is only required to run on
one machine (more a rule than a requirement).

Also remember what has happened, when some funny
guys started placing USMC markers on the map, where there
were others not having installed them (even not on the
server). I remember for sure, the we had to rejoin the
server after the crash  ;)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Unnamed

  • Guest
Re:using custom made addons in your mission
« Reply #4 on: 12 Jan 2004, 02:25:56 »
Yeah it works, because you dont need OFP to compile the Mission.sqm when you create a mission pbo. You can bypass the Mission editors checks by editing it yourself.

From what Chris says is probably one for single player only, unless you can get the server to check each client or something, and create everything itself?
« Last Edit: 12 Jan 2004, 02:30:22 by Unnamed »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:using custom made addons in your mission
« Reply #5 on: 12 Jan 2004, 02:53:52 »
Nah m8,

createVehicle in multiplayer has to be executed ONLY on
one machine.

createVehicle without a check to run on only one machine
will cause that each client + the server will create a vehicle
of given type.

In case of 10 players connected will be a result of 11 exemplaries of the same vehicle, visible and usable for
everyone.

createVehicle an A10 only on the machine, not having installed
the addon will create an A10 on everybody's machine.

This has nothing to do with the method, how you create
your mission.pbo.

What you mean is one for single player only, as there's only
the one and only machine, creating that vehicle upon a certain
condition: if addon exists createVehicle addon, if not, createVehicle: A10

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:using custom made addons in your mission
« Reply #6 on: 12 Jan 2004, 02:59:54 »
Just one more thought about that for a work-around:

You could try creating an addon vehicle somewhere not
visible to anyone.

Then you do a check for the isnull rc.
If isnull then: addon_not_there = 1; publicVariable "addon_not_there"

Now you know, if there's at least one client connected, not
having that addon installed.

Upon this info, you could either create the addonVehicle, to
be used in your mission, or exchange it by a non-addon vehicle.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:using custom made addons in your mission
« Reply #7 on: 12 Jan 2004, 07:40:02 »
Also remember what has happened, when some funny
guys started placing USMC markers on the map, where there
were others not having installed them (even not on the
server). I remember for sure, the we had to rejoin the
server after the crash  ;)

~S~ CD

I tried that once, just to see what happen. The only thing that happen was that the other guys couldn't see the markers. Wonder why u crashed and not me.

:beat: *Gets Shot* :beat:

Unnamed

  • Guest
Re:using custom made addons in your mission
« Reply #8 on: 12 Jan 2004, 07:41:53 »
Quote
Upon this info, you could either create the addonVehicle, to
be used in your mission, or exchange it by a non-addon vehicle.

Yeah, thats what I was thinking of. I dont know much about multiplayer, so I could only guess.

Cheers

Quote
This has nothing to do with the method, how you create
your mission.pbo.

The bit about the mission.sqm is just to ensure OFP knows nothing about what addons are required, when it loads the mission from the server or your PC.

Not sure how much use it would be? But for singal player games, you could at least include your favourite addons.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:using custom made addons in your mission
« Reply #9 on: 12 Jan 2004, 10:19:56 »
Quote
I tried that once, just to see what happen. The only thing that happen was that the other guys couldn't see the markers. Wonder why u crashed and not me.

 *Gets Shot*  

Armsty, this may come from the reason that me probably
started playing/editing OFP a tiny lil bit earlier than you  ;D

BIS might have fixed that somewhere around the 1.8x patch
series.

Forgive me for not having tried to crash the server a second
time, just to notice it doesn't crash anymore  ;D


Unnamed:

Yah i knew what you meant about hiding the addon from
the addons section in the mission.sqm's top by externally
pbo'ing the mish.

But AFAIWTLTINT (*hint* as far as it was the last time i noticed
that) createVehicle'ing a unit during the mission, doesn't
affect the addons and addons-auto section in the mission.sqm.

(maybe BIS fixed that too but i don't think so)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:using custom made addons in your mission
« Reply #10 on: 12 Jan 2004, 12:16:16 »
donno

i made mision 1ce dat used createvehicle on som addon - nd it wasnt included in da mission.sqm (mision used sebnam 2 - so wat waz da ver wen it 1st released ?) nd i think kali got error wen it was created even tho he had da addon - but m not sure  :-\ it was ages ago

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Unnamed

  • Guest
Re:using custom made addons in your mission
« Reply #11 on: 12 Jan 2004, 12:52:15 »
Quote
But AFAIWTLTINT (*hint* as far as it was the last time i noticed
that) createVehicle'ing a unit during the mission, doesn't
affect the addons and addons-auto section in the mission.sqm.

For the record, they have fixed it. At least for the addon I created using CreateVehicle, from within a units init field. Not tried it using scripts.

As soon as you save\export the mission, it adds a reference to the addon in the mission.sqm.
« Last Edit: 12 Jan 2004, 12:52:47 by Unnamed »