OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: dolty666 on 19 Mar 2008, 15:16:29
-
Sorry for being thick, but this is doing my head in....
I would like to make a simple trigger for an Arma mission, no need to call some script. The idea is to create an MG UAZ. I have something wrong with the syntax, but I cannot figure out what...
"UAZMG" createVehicle getMarkerPos "spawn1"
This line is not accepted in the editor, but it is identical to the example given in the COMREF. I suspect some difference in syntax between script and edit, but what?!
Help, anyone!
-
For the trigger, assign the result to a variable:
mynewuaz = "UAZMG" createVehicle getMarkerPos "spawn1"
-
For the trigger, assign the result to a variable:
mynewuaz = "UAZMG" createVehicle getMarkerPos "spawn1"
Cheers for the help. However, entering this on the "on act" line does not generate a UAZ. Which is logical, I suppose, as should I not tell the trigger to do something with the variable I have made now? Do I record this variable elsewhere?
Or, perhaps, being cluseless should I ask, "What do I enter in the fields on the trigger dialog screen so that the UAZ will be spawned when X conditions are met?"
Thanks again, and apologies for my incompetence....
-
That code, already tested, creates a UAZ MG at the coords of marker named "spawn1".
About the conditions to be met, they are up to you. But you may test it with a simple trigger RADIO ALPHA.
-
Cheers again for the help, very kind. You are right-- I forgot to move the marker to where I could see it! Completely daft....
If I may, one last question-- is it possible to simplify this trigger to get rid of the marker? That is to say, what can I enter into the trigger dialog box to spawn said UAZ near the trigger? I have tried 'position player', but to no avail.
Thanks for suffering through my lack of understanding.
-
Give a name to the trigger, lets say tr1, then instead of the marker just use the coords of the trigger:
getPos tr1