Well, as i promissed above, here's an example mission,
showing you "some" of the possibilities when using waypoint
type scripted.
As explanation of the example i'll post the readme file.
There's also an ingame-explanation by hints, which can
be enabled/disabled ingame by action-menu, or by a
parameter within init.sqs.
Scripted waypoints example_01
by Chris Death [BF]
This is a self explaining example mission to show
you how powerfull the waypoint type: scripted is.
The missions consists of:
1 - 8men group (west)
1 - M113 (west) - manned
1 - script for the waypoint type scripted - getin.sqs
1 - script to be activated by action button (bottom right menu)
The 8men group has 3 waypoints:
waypoint 1: type move
waypoint 2: type scripted - the waypoint itself is placed exactly onto
the M113
scripted box: getin.sqs
waypoint 3: type move
Now as soon as the group has reached the waypoint before the waypoint
type scripted, the script in the scripted box starts executing.
The group will act like there were no waypoints, until the script
exits running.
Once the script has ended, the group will start moving to the waypoint
after waypoint type scripted (in this case waypoint 3).
All actions like movement/boarding/disembarking/behaviour setting
were done by using the parameters, which get automatically passed
from waypoint type scripted to the script.
[owner_of_waypoint,position_of_waypoint,target/object_at_waypoint]
- owner_of_waypoint = group which owns the waypoint
- position_of_waypoint = 2-3D array (coordinates of waypoint scripted)
- target/object_at_waypoint = object where the waypoint is placed
onto - will be NULL-OBJECT, if the waypoint is placed into open
grounds.
The variables being used inside the script were all built out of
the three parameters.
Bonus feature:
The script features hint messages, which can be toggle on/off during
the mission by using the right-bottom action menu ingame.
By default the hints are set to on = hints will be shown.
If you want to disable the hints right from the start, just change
the following line in the file: init.sqs
no_hints = false
to disable hints, just change false to true
no_hints = true
These hints were made using hintC, and will show you the most important
keywords/variables/steps, being used while the script is running.
I've used hintC, so that you have to click continue or press enter
when finished reading the message.
These hints also explain, how the whole thing works.
~S~ CD