OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sharkattack on 23 Feb 2007, 13:48:45

Title: choosing insertion type and location
Post by: sharkattack on 23 Feb 2007, 13:48:45
hi ...
im starting on a campaing for arma
i would like to give the player a choice when it comes to starting a mission ie select starting point ,type of infil (air, boat) ..
can anyone give me any tips or pointers .. i remeber a mission in ofp when this was possible  and it helped loads with the re playability of the mission ..  many thanx in advance

                          shark attack
Title: Re: choosing insertion type and location
Post by: Terox on 24 Feb 2007, 21:27:31
well you have 3 options

for true pre-start option selection, you would utilise the param1, param2 defines in the description.ext

or you could implement various options at mission start time, such as
1) An addaction system
2) A dialogue based system


hope that gives you something to play with
Title: Re: choosing insertion type and location
Post by: sharkattack on 25 Feb 2007, 12:12:32
thanx mate ... ill play around in editor ..hopefully it will come to me ..
do i set the param1, param2 defines in the description.ext as i would for mp ??
or is it different for single play....

Title: Re: choosing insertion type and location
Post by: Terox on 25 Feb 2007, 13:08:23
i have no idea when it comes to sp missions, i've never actually made one, not in over 5 years sorry
Title: Re: choosing insertion type and location
Post by: Mandoble on 25 Feb 2007, 13:26:09
This is for OFP, but should work fine for ArmA.
In your init.sqs execute an script to move the camera away from initial player position. You may also want an initial black screen, but not really needed, it would be better to have the camera pointing to some nice location. This way you will never see the player's initial position. Place as many markers as needed for insertion locations (visible markers with a short description), force map and anim it for first insertion point. Now show a dialog (defined in your description.ext) with a single list box with the long description of the available insertion points, each time current selection changes, map anim again to the new marker. Your dialog should have also an ok button, once pressed you hide the map (forcemap false again), close the dialog, move your group to the selected insertion point and delete the camera.
Title: Re: choosing insertion type and location
Post by: sharkattack on 26 Feb 2007, 10:43:33
thanx very much for youre advice mandoble ...
however im stuck when it comes to showing possible insertions with forcemap.. how do i anim map to show first insertion ..  ??? ... again thanx very much for advice  any further pointers will be much appreciated !
Title: Re: choosing insertion type and location
Post by: Mandoble on 26 Feb 2007, 11:01:54
In OFP, after forzing the map with forceMap true, you use:
mapAnimAdd [time, zoom, position]
and then
mapAnimCommit to commit the map animation.

for example
Code: [Select]
forceMap true
mapAnimAdd [1, 0.5, getMarkerPos "mk_insertion1]
mapAnimCommit
~4
forceMap false
exit
Title: Re: choosing insertion type and location
Post by: sharkattack on 26 Feb 2007, 11:12:25
thanx mate ... ill give it a go ... cheers

* edit ..
great i have the map anims working at start of mission .. showing the possible start points  ... now for the dialog ..
dont suppose there is a tutorial on creating dialogs .. ive looked at the one in editors depot  but demos are for ofp i no longer have the game .. again many thanx in advance ...
Title: Re: choosing insertion type and location
Post by: Cheetah on 26 Feb 2007, 15:05:08
I suggest that you read the dialog tutorial (http://www.ofpec.com/ed_depot/the_files/OFPResources/tutorials/Dialog%20Tutorial.zip) by vektorboson, because ArmA and OFP dialog making are probably the same thing.

If you run into problems, you can of course ask for help.
Title: Re: choosing insertion type and location
Post by: sharkattack on 26 Feb 2007, 21:11:16
will do cheetah ... thanx ...

*edit
========

WOW  .. im in for a long night (or five) ... why is nothing in life easy    :P
Title: Re: choosing insertion type and location
Post by: BensTooCool on 27 Feb 2007, 20:03:24
This is what I'm trying to do as well  I want to give the player a choice of about 3 different insertion points on the map but I dont know where to begin is there any tutorials or scripts I can get?
Title: Re: choosing insertion type and location
Post by: sharkattack on 28 Feb 2007, 21:03:25
guys this is beyond me ... for now ..
didnt realise it would be so complicated .. well ive set myself an objective .. stand by ..
(5 long  nights  more like 5 long months )
                                                                              thanx for advice ..   ;)
Title: Re: choosing insertion type and location
Post by: macguba on 01 Mar 2007, 11:37:57
This works in OFP, haven't tested it in ArmA.     To get random starting positions, place markers at the various start positions.    Group them to the player.   You will then start in one of the positions, chosen randomly.

I know this is not quite what you asked, but it might do as a quick and dirty workaround.

To give the player choice, start by using an addAction method.   It's uglier than dialogues, but you will get you started on the mechanics of actually moving the player around.
Title: Re: choosing insertion type and location
Post by: sharkattack on 01 Mar 2007, 18:11:54
thanx mate
have been using the group with marker method for random starts .. works fine in arma ..

and thanx for youre advice on addaction this is certainly something im gonna look into ..

again many thanx        :good: