286 Commits

Author SHA1 Message Date
Sven Van de Velde
604db7e53c BIGFIX: Reworked the code so that SCORING is working with STATIC objects.
The problems were in the EVENTDISPATCHER.

-- Reworked the Event Dispatcher code...
-- Added fields IniCategory and TgtCategory that indicate which Object
Category is involved in the Event.
-- Added fields IniPlayerName and TgtPlayerName that indicate which
Player Name is the initiator or Target (only when the Object Category is
a UNIT).

-- In the Event.lua, I poperly documented every field in EVENTDATA and
typed it correctly.

-- Reworked te Scoring code..
-- Incorporated the Event.* added fields into the Scoring Code.

-- Added a SCO-100 test mission
-- A shooting range with STATIC objects, so that a player can TEST the
scoring for STATIC objects in  a mission.

Hope this helps.
FC
2017-02-24 12:10:27 +01:00
Sven Van de Velde
3a5f4ccd55 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix-scoring
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-02-24 10:42:26 +01:00
Sven Van de Velde
6fb5a88953 Fixed GROUP:IsAlive() returning true even if all group members aredead
Fixed the mechanism by checking if the group has a :getUnit(1) ~= nil
2017-02-23 17:25:16 +01:00
Sven Van de Velde
d0b0ce7483 Scoring fix 2017-02-23 08:44:54 +01:00
Sven Van de Velde
33f064141f Reviewed all the zone test missions 2017-02-21 12:17:14 +01:00
FlightControl
d7c2e0f900 Reworked zone and vector functions
2017-02-08 - Reworked some vector functions.
-- POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added.
-- ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added.
-- ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added.
-- ZONE_POLYGON_BASE:GetRandomPointVec2() added.
-- ZONE_POLYGON_BASE:GetRandomPointVec3() added.
2017-02-18 22:38:31 +01:00
Sven Van de Velde
e788bc928d Merge pull request #245 from FlightControl-Master/CraigOwen
EVT-501 OnEventLanding LandingChallengeComplex
2017-02-16 19:26:56 +01:00
CraigOwen
b60526686f Moved the LandingChallenge
Created new folder EVT-501
Changed mission and script name to EVT-501 OnEventLand
LandingChallengeComplex
2017-02-15 22:08:21 +01:00
CraigOwen
423c45489e Full landing challenge
This mission combines eventmanagement with sets and scheduler for a full
landing challenge. Descriptions are given for each step.
2017-02-15 20:03:23 +01:00
FlightControl
3473076814 Fix for Delta, hopefully solves error in Event Handling. 2017-02-14 16:55:02 +01:00
FlightControl
84b5f2dd68 Added EVENTHANDLER class for generic event handling 2017-02-14 13:15:11 +01:00
FlightControl
d1877ba300 the rest 2017-02-14 11:04:39 +01:00
FlightControl
a174fa5169 the rest 2017-02-14 11:04:31 +01:00
FlightControl
2f50854c74 the rest 2017-02-14 11:04:25 +01:00
FlightControl
c72354a914 the rest 2017-02-14 11:03:57 +01:00
FlightControl
843759193f the rest 2017-02-14 11:03:53 +01:00
FlightControl
247abe57f3 the rest 2017-02-14 11:03:46 +01:00
FlightControl
88943f9c96 the rest 2017-02-14 10:59:23 +01:00
FlightControl
19842bd7f0 the rest 2017-02-14 10:59:10 +01:00
FlightControl
a50b497840 the rest 2017-02-14 10:58:56 +01:00
FlightControl
bd9d831b49 the rest 2017-02-14 10:58:48 +01:00
FlightControl
ff48d20c40 menu 2017-02-14 10:56:52 +01:00
FlightControl
4b65b944b3 group 2017-02-14 10:56:45 +01:00
FlightControl
1ac2dde262 fsm 2017-02-14 10:56:38 +01:00
FlightControl
b24c04f64e event handling 2017-02-14 10:56:30 +01:00
FlightControl
21ddf8f0c0 Escort 2017-02-14 10:56:18 +01:00
FlightControl
9cc04e31a1 Detection 2017-02-14 10:56:06 +01:00
FlightControl
17e3d51b56 Cargo test missions updated 2017-02-14 10:55:54 +01:00
FlightControl
085f7628fd CAS test missions updated 2017-02-14 10:55:36 +01:00
FlightControl
d4d521b432 AIB Test Missions Updated 2017-02-14 10:55:21 +01:00
Delta-99
895bff0121 AI Balancers for all airports and both coalitions demo mission
AI Balancers for all airports and both coalitions demo mission
2017-02-12 14:56:46 -05:00
CraigOwen
099697f582 Example for EventOnLand
In this example a client can land a plane in specified zones. In case of
success, there will be a message and a flaring unit.
2017-02-12 18:14:39 +01:00
FlightControl
50f37d4dbe Fixed glitch in AI_CAP_ZONE 2017-02-08 11:58:35 +01:00
FlightControl
8c0adea841 Fixed glitch in AI_CAP 2017-02-08 10:24:50 +01:00
FlightControl
24c896b535 Event Documentation 2017-02-07 21:53:23 +01:00
FlightControl
fa8fcfec89 Event Documentation 2017-02-07 20:20:58 +01:00
FlightControl
1441d035d7 updated event handling 2017-02-07 13:44:59 +01:00
FlightControl
3db8062583 Event Handling Optimization
-- Created a HandleEvent method
-- Created an UnHandleEvent method
2017-02-07 13:33:29 +01:00
FlightControl
154f729788 Event Handling improved 2017-02-07 10:34:16 +01:00
FlightControl
c512eaad04 InitRandomTemplates
test mission
2017-02-06 17:15:08 +01:00
FlightControl
93e7fab116 Fixed AI_CAS_ZONE
-- Added separate detection loop during engagement
-- Detection during patrolling is off.
-- Engage now has several parameters that specify how to engage within
the zone.
-- Created several additional test missions, more to come.
2017-02-06 14:58:19 +01:00
FlightControl
b9b829a09a Various fixes
-- Fixed AI_CAP_ZONE: Groups not engaging when an engage was "aborted",
but was actually erroneously set to "Accomplished". Is fixed now. An
engage that cannot be accomplished (due to no unit in the Engage Zone,
will be Aborted). Groups are engaging now when an Engage Zone is set.
-- Fixed FSM: There was a big issue with delayed function scheduling.
When creating "loops", meaning an Event handler calles again itself
delayed, would start propagating multiple times when the event was
scheduled, and another schedule of the event would be planned.... Thus 2
to x events handled and would end in chaos. Implemented delayed event
scheduling accepting a *negative* parameter in seconds, which would
check if an event would be already scheduled. If so, no new event would
be scheduled until the event handler would have been processed. In this
way, only maximum one event can be scheduled when this is wanted (this
is not always the case by the mission designer). So providing a negative
value as the seconds would make the event being scheduled only once!
-- Added EventPriority field in EVENT logging
-- Removed logging from POSITIONABLE
-- Moved the start of the detection to the Start event handler in
AI_CAP_ZONE
2017-02-05 18:06:29 +01:00
FlightControl
a530cea326 Fixed glitch in EVENT with new EventPriority logic
The Init method was wrong. It is fixed now.
SPAWN and other event handling will now be correctly processed!
2017-02-05 10:26:07 +01:00
FlightControl
8acfb79c0e USAF agressors fix (and also for other countries with _ names in country.id)
-- reworked the DATABASE template population logic
2017-02-05 08:31:03 +01:00
FlightControl
a669ba5e5b bugfix with uncontrolled 2017-02-04 19:32:54 +01:00
FlightControl
52f4051901 Various Fixes
-- Documentation fixes with links not working.
-- MENU_CLIENT_COMMAND had a small glitch, fixed that one too.
-- Implemented new Event Dispatcher.
--
2017-02-04 15:16:32 +01:00
FlightControl
be4d51237b Improved the event handling
-- Removed the sort
-- Implemented the order in the existing table.
-- 5 levels
-- _DATABASE = 1
-- SET and SET_ derived classes = 2
-- UNIT = 3
-- GROUP = 4
-- all other = 5
2017-02-04 11:35:58 +01:00
FlightControl
ab345f5ad2 New Event Dispatching based on priorities
-- First _DATABASE
-- then SETS
-- then the rest
-- changed AIRBASEPOLICE
2017-02-03 22:18:51 +01:00
FlightControl
98a77e2856 Added AI Off methods in SPAWN and GROUP
-- Added SPA-017 test mission
-- Added SPAWN:InitAIOnOff()
-- Added SPAWN:InitAIOn()
-- Added SPAWN:InitAIOff()
-- Added GROUP:SetAIOnOff( AIOnOff )
-- Added GROUP:SetAIOn()
-- Added GROUP:SetAIOff()
-- Documentation
2017-01-24 11:09:55 +01:00
FlightControl
81b04bdbfb Trace off for mission 2017-01-23 15:30:54 +01:00