Home   Help Search Login Register  

Author Topic: Using Scripts to create waypoints, including cycle  (Read 527 times)

0 Members and 1 Guest are viewing this topic.

chard

  • Guest
Using Scripts to create waypoints, including cycle
« on: 24 Feb 2004, 18:56:42 »
I need guidance on how to write a large complex mission.

I don't want to place dozens of groups with all of their respective waypoints on the map at the beginning of the mission.   Instead I'd like to be able to summon them through a script, with all of the same waypoints, especially cycle, and sync.

eg.1  
One of the mission objectives is to recover missing friendlies.  In order to permit replaying the mission, or to keep previous players guessing, there are at least 10 different possible locations for the target to be at.  A script could pick a random location and populate it with all of the necessary units/waypoints/triggers/cutscenes.

eg.2
The players are expected to meet certain "obstacles/resources" regardless of where they find themselves.  This could range from a partol, to a helicopter to wrecked vehicles or ai preforming tasks and/or there to provide assistance/information.  Once again, the script, executed by whatever means would be able to create all the necessary units/waypoints/triggers/cutscenes.


Any suggestions? Anyone done this already?

Chard
« Last Edit: 24 Feb 2004, 18:57:47 by chard »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Using Scripts to create waypoints, including cycle
« Reply #1 on: 24 Feb 2004, 19:19:11 »
If I understand you correctly, you have a large number of loons/vehicles etc whose start position depends on the start position of the Objective.

There are several ways of dealing with this.    For a start, I would reduce the number of locations:  you are virtually trying to create ten missions in one, which is an awful lot of work.    

Create the mission around one start position.    Playtest it till everything works.  Place markers or gamelogics at the positions of all waypoints and unit start positions.   Repeat for all possible start places.    Your map will now be covered with named markers.  I'm assuming that you use the same groups, and they have the same sequence of waypoints for each start place.      

When you're done, place the units and waypoints at some random place in the far corner of the map.    Now detect which start place the game has selected and use setPos and setWPPos to move everything to the right spot.

There is a mission like this in the Beta testing board at the moment - deaddog's Lost in Nam.    I strongly recommend you examine it closely both for good ideas and mistakes to avoid.   I'm sure deaddog won't mind you borrowing stuff if you ask nicely and give him credit.


Plenty of reviewed ArmA missions for you to play

Don_T_Shoot

  • Guest
Re:Using Scripts to create waypoints, including cycle
« Reply #2 on: 25 Feb 2004, 01:24:29 »
[icarus_uk] was talking about a solution to the problem of WP's for units created from a script recently.

In the editor, create a leader complete with WP's have him hold at first WP.  Then add the leader's subordinates with a script when needed and let them continue on their way when it's time.    


One thing to keep in mind is that if you create a type that isn't already on the map you are bound to get "stuttering server" when the server calculates whatever it needs to when creating a new model.   It's best to spawn the same type of units that you placed in the editor.