so you'll have to use the invisible helipad item instead
as much as i remember dey wont fire on dat also
@ gonner n specops
GLs get lots of uses - i know u cud search 4 da thread dat had 2 Tuts bout dat - but da search function is f00ked up (or shud i say - its seems dat it went 2 heke
- sry gad but i just had 2 do it
;D)
just got da search workin
here r qoutes form da thread i was talkin bout
from chris death
Well, the "logic groups" i've mentioned above isn't the
one by Sefe, therefore here are Sefe's words from the
old forum:
Code:You may have asked yourself what's the use of the game logic units. Most mission designers use it to get positions on the map (eg. Position = GetPos NameOfTheGameLogic).
But the game logic units have a much higher potential! You can use them to implement complex conditions to your missions without using any scripting. But you have to understand the behaviour of game logics:
1. Game logics have a position and can activate triggers just like any other units. Take a look at the condition box of a trigger. There you will find the option "game logic present". You can also group the game logic and the trigger and set the condition to "vehicle present". In this case the trigger will only be activated by the presense of this game logic.
2. You can define waypoints for a game logic unit. The waypoint type can be AND or OR (unlike the waypoints for a 'regular' unit that can be MOVE, HOLD, SEEK AND DESTROY etc.). I'll come to the waypoint type later. As soon as the mission starts, the game logic will go from waypoint to waypoint. But unlike all other units the game logic will not move to the waypoint but 'jump' immediately to it's position.
3. Like for all other waypoints you can define a condition, a timeout and an OnActivation code for a game logic waypoint. When a game logic reaches a waypoint it will perform these actions (in this order):
Wait until the condition is TRUE
Wait until the timeout is passed
Execute the OnActivation code
Jump to the next waypoint
4. Like all waypoints you can synchronize a game logic waypoint with a trigger. That means that the game logic will not proceed to the next waypoint until the trigger condition is TRUE. Now we'll return to the type of the game logic waypoint (AND or OR). If you synchronize more than one trigger with the waypoint, the behaviour of the trigger will depend on the waypoint type. If it is an AND waypoint, the game logic will only jump to the next waypoint when all triggers are activated. If it is an OR waypoint it will proceed to the next waypoint when any of the triggers is activated.
5. Like all other waypoints you can also synchronize a game logic waypoint with any other waypoint. The game logic and the other unit will not proceed to their next waypoints until both of them have reached the synchronized waypoint. This is absolutely the same behaviour as if you would synchronize two non-game logic units. Of course you can also synchronize two game logic waypoints.
But what is that all good for? I'll give you some examples showing the whole potential of game logic units:
Example 1: Establishing radio conversations
To establish a radio conversation you would probably write a script that would look like this:
Alpha1 SideRadio "Message1"
~5
Bravo1 SideRadio "Message2"
~8
Alpha1 SideRadio "Message3"
Without a script you would do it like this:
You'd create a game logic and four waypoints
You'd synchronize the first WP with the trigger that will start the conversation
In the second WP's OnActivation field you'd write: Alpha1 SideRadio "Message1"
In the third WP's OnActivation field you'd write: Bravo1 SideRadio "Message2". Since this radio message has to be sent five seconds after the first, you'd set the timeout to five seconds
In the fourth WP's OnActivation field you'd write: Alpha1 SideRadio "Message3". You'd set the timeout to eight seconds.
As you can see, we can use the timeout of the game logic WPs to time events without having to call a script. While the timeout is equivalent to the ~-operator, the condition field is equivalent to the @-operator.
You can use this method also to create cutscenes without any scripting. In the attachment you will find an example mission that demonstrates a cutscene (radio Alpha) and a radio conversation (radio Bravo).
Example 2: Combining triggers to complex condtions
Now it's going to be a little more complex. What if you had three triggers. The third trigger should be activated if one of the two other triggers are activated. You could also express it like this:
Trigger3 = Trigger1 OR Trigger2 [do not use this syntax in OFP, it's just to describe the boolean correlation of the triggers]
To achieve that you can use a game logic unit:
Create a game logic and define two waypoints. Place the first waypoint outside the third trigger's area and the second one inside the area.
Set the first waypoint's type to OR.
Synchronize the first and the second trigger with the first (OR) waypoint
Draw a group line [F2] between the game logic and the third trigger. Set the trigger's condition to "vehicle present"
The whole thing will work like this: At the beginning of the mission, the game logic will jump to it's first waypoint. Since it's outside of the third trigger's area, it doesn't activate it. The game logic will wait at this OR-waypoint until either the first or the second trigger will be activated. As soon as this happens, the game logic will jump to it's next waypoint. This waypoint is inside the area of the third trigger and so it will be activated. That will cause exactly the effect we wanted.
Finally, let's get really advanced. This time you have four triggers. The fourth trigger should be activated on this condition:
Trigger4 = (Trigger1 OR Trigger2) AND Trigger3
Let's go to work:
Create a game logic, define two waypoints. The first one must be an AND waypoint. The second waypoint must be inside the area of Trigger4. Group Trigger4 and the game logic and set the trigger condition to "vehicle present". This is all similar to above (except that we now use an AND waypoint).
Synchronize Trigger3 with the first waypoint of the game logic.
Create a second game logic with two waypoints. Set the first waypoint to OR. Synchronize the second waypoint with the first waypoint of the other game logic.
Synchronize Trigger1 and Trigger2 with the first (OR) waypoint of this game logic.
But how the hell does this work?
The second game logic will proceed to it's second waypoint if either Trigger1 or Trigger2 is activated. That's the same as above. You could also say:
GameLogic2ReachedWaypoint = Trigger1 OR Trigger2
The first game logic will reach it's second waypoint and activate Trigger4 when Trigger3 is true and the second game logic has reached it's second waypoint:
Trigger4 = GameLogic2ReachedWaypoint AND Trigger3
If you combine these expressions, you'll get:
Trigger4 = (Trigger1 OR Trigger2) AND Trigger3
Voilà !
You can even create more complex condtions in your mission when you combine three or more game logics.
hope you forgive me Sefe that i kept you from typing that
all again by yourself
~S~ CD
nd from tomby
btw, I found some stuff too, didn't keep the authorName, sorry 'bout that, and some of it may overlap what ole seffy wrote back then, but anyho' - here goes :
Code:This tutorial explains how to use Logic groups in your missions.
Logic groups allow you to create a sequence of waypoints on the map that are not
tied to a physical group in the game. The logical groups behave like a group in
that it moves from waypoint to waypoint but there is no actual units
displayed in the game.
The demo mission uses these logic groups to drive the following conversations
in the demo mission :
Officer saying wait here and beginning of mission
Officer talking with the patrol
Officer talking to you while in the jeep
Officer talking while you are driving the jeep
The waypoints of these logic groups shadow the movement of the soldiers that are
having the conversation thereby allowing the mission builder to seperate the
conversation from the actual movement of the soldiers.
The following is an example of how a logic group is used in the demo mission.
NOTE : I haven't done much with logic groups yet so some of this might be assumptions.
Example : Officer talking in jeep during demo mission
At the beginning of the demo mission there is a point where the officer and your
character jump into the jeep and the officer proceeds to tell you about the mission
while he is driving. The entire dialog is handled with the LOGIC functionality.
Below is waypoint number 4 for the item11 group (the group consisting of the
officer and your character). This waypoint indicates that the group should get
into the assigned vehicle (in this case the jeep). Notice the synchronization field
set to 8? This indicates that the expActiv field will not be executed until any other
sensors or waypoints with synchronization equal to 8 have been triggered.
More about that in a moment.
class Item3
{
position[]={8110.902832,10.232186,5093.410645};
id=41.000000;
type="GETIN";
combat="AWARE";
expActiv="0 fadeMusic 0.22";
synchronizations[]={8};
class Effects
{
track="05demo";
};
showWP="NEVER";
};
Below is the logic group from the demo mission which is used to execute the dialog
within the jeep. Notice that the side field equals "LOGIC". It only needs a single
vehicle defined in this group and its side field is also set to "LOGIC" and the
vehicle field is set to "Logic". For any logic group you would create you would use
a similar vehicle definition.
The waypoints are where the interesting stuff is. Notice each waypoint has the
type field must be set to "AND".
Take a look at waypoint 0. Notice its synchronization field is set to 8?
This indicates that this logic group will not proceed to waypoint 1 until
waypoint 4 of the group the officer and your player are in has been triggered
(i.e. they both got into the jeep).
Okay, once the officer and your character are in the jeep then waypoint 1 is triggered.
Notice its expCond field is "off in jeep and aP in jeep"? No sense having a dialog if
both participants aren't in the jeep! If the condition is true then the game
waits 4 seconds (based on the values of the timeout fields) and the executes the command
in the expActiv instructing the officer to say something.
Waypoint 2 is then triggered. Again notice its expCond field is
"off in jeep and aP in jeep"? No sense having a dialog if both participants aren't
in the jeep! If the condition is true then the game waits 17 seconds
(based on the values of the timeout fields) and the executes the command in
the expActiv instructing the officer to say something else.
Waypoint 3 is then triggered.
Again notice its expCond field is "off in jeep and aP in jeep"?
No sense having a dialog if both participants aren't in the jeep!
If the condition is true then the command in the expActiv instructing
the officer to say something else is executed. Notice the syncrhonization field
is set to 9? That means the command in the expActiv field won't be executed until
any other sensors or waypoints with synchronization set to 9 are also triggered.
Read below to see the sensor with synchronization set to 9.
class Item23
{
side="LOGIC";
class Vehicles
{
items=1.000000;
class Item0
{
position[]={8058.157715,5.852848,5001.322266};
special="NONE";
id=87.000000;
side="LOGIC";
vehicle="Logic";
leader=1.000000;
lock="LOCKED";
skill=1.000000;
markers[]={};
};
};
class Waypoints
{
items=4.000000;
class Item0
{
position[]={8105.548340,5.450422,5001.322266};
type="AND";
synchronizations[]={8};
class Effects
{
};
showWP="NEVER";
};
class Item1
{
position[]={8143.950684,6.763751,5001.321777};
type="AND";
expCond="off in jeep and aP in jeep";
expActiv="off say ""S02v03""";
synchronizations[]={};
class Effects
{
};
timeoutMin=4.000000;
timeoutMid=4.000000;
timeoutMax=4.000000;
showWP="NEVER";
};
class Item2
{
position[]={8169.280273,7.815929,5001.321777};
type="AND";
expCond="off in jeep and aP in jeep";
expActiv="off say ""S02v50""";
synchronizations[]={};
class Effects
{
};
timeoutMin=17.000000;
timeoutMid=17.000000;
timeoutMax=17.000000;
showWP="NEVER";
};
class Item3
{
position[]={8190.720215,8.735840,5001.470703};
type="AND";
expCond="off in jeep and aP in jeep";
expActiv="off say ""S02v05""";
synchronizations[]={9};
class Effects
{
};
showWP="NEVER";
};
};
};
Below is a sensore defined in the demo mission. It is triggered when vehicle id 41
(i.e. the jeep) has entered an area surrounding position (7609,4807).
It has a synchronization field set to 9 same as the logic groups last waypoint.
This means that the officer will not say string S02v05 (from waypoint 3)
until the jeep has reached this area. The officer and your character (in the jeep)
will cause this sensor to trigger since their fourth waypoint (the one after the
GETIN waypoint) is very close to that position.
class Item19
{
position[]={7609.221191,28.079998,4807.668457};
a=20.000000;
b=20.000000;
activationBy="VEHICLE";
age="UNKNOWN";
idVehicle=41.000000;
text="Dorazili";
class Effects
{
};
synchronizations[]={9};
};
That is how the conversation in the jeep was scripted using LOGIC functionality.
The same thing could have been achieved by having multiple waypoints defined for
the officer and your character group from the time they get into the jeep
(waypoint 3) and the time they reach the village (waypoint 4).
Each of these new waypoints would then have the officer saying one of his
profound statements. By using the logic group though you are not tightly coupling
the actual movement of the jeep with the dialog but rather the dialog is occuring
at certain time intervals during the trip. This allows the mission builder to tweak
the movement path independent of the conversation.
-----------------------------------------------------------------------------------
You may have asked yourself what's the use of the game logic units.
Most mission designers use it to get positions on the map
(eg. Position = GetPos NameOfTheGameLogic).
But the game logic units have a much higher potential! You can use them to
implement complex conditions to your missions without using any scripting.
But you have to understand the behaviour of game logics:
1. Game logics have a position and can activate triggers just like any other units.
Take a look at the condition box of a trigger. There you will find the option
"game logic present". You can also group the game logic and the trigger and set
the condition to "vehicle present". In this case the trigger will only be activated
by the presense of this game logic.
2. You can define waypoints for a game logic unit. The waypoint type can be AND or OR
(unlike the waypoints for a 'regular' unit that can be MOVE, HOLD, SEEK AND DESTROY etc).
I'll come to the waypoint type later. As soon as the mission starts, the game logic will
go from waypoint to waypoint. But unlike all other units the game logic will not move
to the waypoint but 'jump' immediately to it's position.
3. Like for all other waypoints you can define a condition, a timeout and an
OnActivation code for a game logic waypoint. When a game logic reaches a waypoint
it will perform these actions (in this order):
Wait until the condition is TRUE
Wait until the timeout is passed
Execute the OnActivation code
Jump to the next waypoint
4. Like all waypoints you can synchronize a game logic waypoint with a trigger.
That means that the game logic will not proceed to the next waypoint until the
trigger condition is TRUE. Now we'll return to the type of the game logic waypoint
(AND or OR). If you synchronize more than one trigger with the waypoint,
the behaviour of the trigger will depend on the waypoint type. If it is an AND waypoint,
the game logic will only jump to the next waypoint when all triggers are activated.
If it is an OR waypoint it will proceed to the next waypoint when any of the triggers
is activated.
5. Like all other waypoints you can also synchronize a game logic waypoint with
any other waypoint. The game logic and the other unit will not proceed to their
next waypoints until both of them have reached the synchronized waypoint.
This is absolutely the same behaviour as if you would synchronize
two non-game logic units. Of course you can also synchronize two game logic waypoints.
But what is that all good for? I'll give you some examples showing the whole potential
of game logic units:
Example 1: Establishing radio conversations
To establish a radio conversation you would probably write a script that would
look like this:
Alpha1 SideRadio "Message1"
~5
Bravo1 SideRadio "Message2"
~8
Alpha1 SideRadio "Message3"
Without a script you would do it like this:
You'd create a game logic and four waypoints
You'd synchronize the first WP with the trigger that will start the conversation
In the second WP's OnActivation field you'd write: Alpha1 SideRadio "Message1"
In the third WP's OnActivation field you'd write: Bravo1 SideRadio "Message2".
Since this radio message has to be sent five seconds after the first, you'd set
the timeout to five seconds
In the fourth WP's OnActivation field you'd write: Alpha1 SideRadio "Message3".
You'd set the timeout to eight seconds.
As you can see, we can use the timeout of the game logic WPs to time events
without having to call a script. While the timeout is equivalent to the ~-operator,
the condition field is equivalent to the @-operator.
You can use this method also to create cutscenes without any scripting.
In the attachment you will find an example mission that demonstrates a cutscene
(radio Alpha) and a radio conversation (radio Bravo).
Example 2: Combining triggers to complex condtions
Now it's going to be a little more complex. What if you had three triggers.
The third trigger should be activated if one of the two other triggers are activated.
You could also express it like this:
Trigger3 = Trigger1 OR Trigger2 [do not use this syntax in OFP,
it's just to describe the boolean correlation of the triggers]
To achieve that you can use a game logic unit:
Create a game logic and define two waypoints. Place the first waypoint
outside the third trigger's area and the second one inside the area.
Set the first waypoint's type to OR.
Synchronize the first and the second trigger with the first (OR) waypoint
Draw a group line [F2] between the game logic and the third trigger.
Set the trigger's condition to "vehicle present"
The whole thing will work like this: At the beginning of the mission,
the game logic will jump to it's first waypoint. Since it's outside of the
third trigger's area, it doesn't activate it.
The game logic will wait at this OR-waypoint until either the first or
the second trigger will be activated. As soon as this happens,
the game logic will jump to it's next waypoint.
This waypoint is inside the area of the third trigger and so it will be activated.
That will cause exactly the effect we wanted.
Finally, let's get really advanced. This time you have four triggers.
The fourth trigger should be activated on this condition:
Trigger4 = (Trigger1 OR Trigger2) AND Trigger3
Let's go to work:
Create a game logic, define two waypoints. The first one must be an AND waypoint.
The second waypoint must be inside the area of Trigger4. Group Trigger4 and the
game logic and set the trigger condition to "vehicle present".
This is all similar to above (except that we now use an AND waypoint).
Synchronize Trigger3 with the first waypoint of the game logic.
Create a second game logic with two waypoints. Set the first waypoint to OR.
Synchronize the second waypoint with the first waypoint of the other game logic.
Synchronize Trigger1 and Trigger2 with the first (OR) waypoint of this game logic.
But how the hell does this work?
The second game logic will proceed to it's second waypoint if either Trigger1 or
Trigger2 is activated. That's the same as above. You could also say:
GameLogic2ReachedWaypoint = Trigger1 OR Trigger2
The first game logic will reach it's second waypoint and activate Trigger4 when
Trigger3 is true and the second game logic has reached it's second waypoint:
Trigger4 = GameLogic2ReachedWaypoint AND Trigger3
If you combine these expressions, you'll get:
Trigger4 = (Trigger1 OR Trigger2) AND Trigger3
Voilà !
You can even create more complex condtions in your mission when
you combine three or more game logics.
som'n like that
l8rs
Tombs
also u can find da thread here
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376;start=30LCD OUT