OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: satexas69 on 04 Mar 2007, 11:55:22
-
I have 4 objectives in my mission, and they all work as planned, tested.
Each trigger has the following syntax :
[server, "objective3"] exec "obj.sqs";
Where objective3 is objective0 through objective3.
My obj.sys works great, and changes my marker colors and gives hints as I want...
_scriptcall = _this select 1
; ============================================================================
?(_scriptcall == "objective0"):goto "objective0"
?(_scriptcall == "objective1"):goto "objective1"
?(_scriptcall == "objective2"):goto "objective2"
?(_scriptcall == "objective3"):goto "objective3"
; ============================================================================
#objective0
"0" objstatus "DONE"
"Fort_Rooster" setmarkercolor "colorgreen"
hint "Fort Rooster Liberated"
obj0=true; publicVariable "obj0"
exit
; ============================================================================
#objective1
"1" objstatus "DONE"
"Vallejo_Hotel_Marker" setmarkercolor "colorgreen"
hint "Vallejo Hotel Liberated"
obj1=true; publicVariable "obj1"
exit
; ============================================================================
#objective2
"2" objStatus "DONE"
"Rashidah_Marker" setmarkercolor "colorgreen"
hint "Rashidah Liberated"
obj2=true; publicVariable "obj2";
exit
; ============================================================================
#objective3
"3" objStatus "DONE"
"Paraiso_Marker" setmarkercolor "colorgreen"
hint "Paraiso Liberated"
obj3=true; publicVariable "obj3";
exit
; ============================================================================
So far, so good right? Well I can't make it END.. I'm having a syntax boolean error....
On my tigger to see if all are done, and execute the END... here's my problem. I'm TRYING to use this, but get an error:
On Condition :Â Â obj0 && obj1 && obj2 && obj3
What am I doing wrong?
FYI - I got this layout idea from the mission "co30_air_cavalry.Sara" - which uses it, and for the life of me, I can't see why his works, mine doesn't and I'm not newbie :confused:
-
Hmmm, you cannot use ? in trigger fields, try just putting:
obj0 && obj1 && obj2 && obj3
Planck
-
for the boolean error. I get it too when I preview the mission in the editor, but it doesn't seem to affect anything. I can still finish all objectives and finish the mission to debriefing screen, so don't worry about that error message.
-
But the boolean error stays at the top of the screen the whole mission.... annoying as hell :(
-
Did you try what Planck suggested?
For some reason in your post where you have written the Condition: obj0 && obj1 && obj2 && obj3 I see two diamond shaped objects between the : and obj0 with question marks in them so I can't tell whether you have something wrong with it :dry: ..
I just tried the script with all the necessary triggers and all worked just fine without any errors..
The end trigger condition must read only
obj0 && obj1 && obj2 && obj3
-
Yes, I have. Even retyped it fresh, removed all spaces, respaced them, etc.
I get THIS error:
'obj0 |#|&& obj1 && obj2 && obj3'
Error &&: Type Object, Expected Bool
-
put them in brackets.
(obj0 and obj1 and obj2 and obj3)
-
'obj0 |#|&& obj1 && obj2 && obj3'
Error &&: Type Object, Expected Bool
Always post the error messages in the initial post because this says clearly that there's nothing wrong with the trigger condition.
It sounds very much like you have some object (vehicle,soldier,trigger,gamelogic,etc.) named as obj0..
Check if any object has been named obj0, you can do it easily by opening the mission.sqm (from your mission folder) in for example wordpad and using the find tool; use text="obj0" as the keyword to search..
Once you find the object check which unit is is and rename it.
You can tell whether some object is named something by the token text being in the 'definitions', like for example in the below example there is a BLUFOR soldier named as obj0 on the map
class Item0
{
position[]={2554.511475,13.860000,2520.991455};
id=0;
side="WEST";
vehicle="SoldierWB";
player="PLAYER COMMANDER";
leader=1;
skill=0.600000;
text="obj0";
};
Obviously the token vehicle tells you what kind of object is in question and side tells you on which side it is.
If it is a trigger that is named obj0 it looks something like this
class Item0
{
position[]={2582.546875,13.860000,2481.195068};
a=0.000000;
b=0.000000;
interruptable=1;
age="UNKNOWN";
text="obj0";
class Effects
{
};
-
Yes well, I suppose it could be the && are not valid unless in scripts, try bedges method using 'and' instead of '&&'.
Planck
-
That's not even an issue..
&& works just fine..
Like I said, I tested this myself and I have no errors and everything works all the way...
-
H- Nailed it... that's exactly what it was.. 2 of my triggers were named "obj1" and "obj3" (it wasn't obj0 itself, apparently any of those under the qualification would give that exact same error)
Thank you VERY much H-, sometimes it's the obvious stuff that drives you nuts for HOURS. :laugh:
ISSUE RESOLVED - Feel free to lock this topic.
-
You can lock it yourself if you think it is solved.
And you can also re-open it if you find it is not solved after all.
Planck