OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Undeceived on 10 Nov 2007, 03:40:26
-
I'm becoming mad because of this already... :confused: I could not get it working and could not find it nowhere. ???
I want a trigger to get activated when the player (lets call him John) reveals (with right mouse-click) a car (Car1).
I tried it many ways, the last thing I tried was this:
#start
IF(John reveal Car1)Then {[] exec "script.sqs";exit;}Else{goto "start"}
but I think it is pretty incomplete, isn't it? :dunno:
Because there always comes an error with |#|...
The strange thing was for me, that this error also comes, when the whole script-file is empty. I don't know (it's the first mission I am making...)
Can you see the mistake? Or is there any other possibility to set up this script?
Thanks for the help already!
-
try a different method. try creating a trigger (call it detect) on the area clicked, then make a list of all units in the trigger. then something like this.
{player reveal _x} foreach detect
then delete the trigger.
surdus
-
problem is dat da reveal commands does wat it says.... reveals da unit... and not check if da player have revealed it... now i know how u can check if da player knows about da unit.. usin da knowsabout (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=h#knowsAbout) command... like dat
waituntil {John knowsabout Car1 > 0.105};
and after dat have da rest of da script (usin .sqf file dat is.... da way u r tryin is a mix between .sqf and .sqs languages... so u r likly 2 get an error...) if u really wanna use an .sqs script den ur line shud lok like dat
#start
~0.01
? (Johnr knowsabout Car1 > 0.105) : [] exec "script.sqs";exit;
goto "start"
or
@ (Johnr knowsabout Car1 > 0.105)
[] exec "script.sqs";exit;
but dis will triger whenever da player knows about da target nd not only if he clicks on it...
now... mebe Mr.Peanut cud give u some hints on how 2 detect if a unit is clicked... as i think dats somin he does in his bino target (http://www.ofpec.com/ed_depot/index.php?action=details&id=410&page=0&game=ArmA&type=fu&cat=xyz) script
nywayz.... dats all i cud think bout :D
LCD OUT
[edit]
right... i forgot
WELCOME 2 OFPEC M8
-
[edit]
right... i forgot
WELCOME 2 OFPEC M8
:D Thanks, this forum is what I have been looking for!
I am going to try it with the codes you guys provided, so I'll report back later, thank you for now!!