Home   Help Search Login Register  

Author Topic: Syntax Help  (Read 1446 times)

0 Members and 2 Guests are viewing this topic.

Offline dolty666

  • Members
  • *
Syntax Help
« 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!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Syntax Help
« Reply #1 on: 19 Mar 2008, 15:28:19 »
For the trigger, assign the result to a variable:

Code: [Select]
mynewuaz = "UAZMG" createVehicle getMarkerPos "spawn1"

Offline dolty666

  • Members
  • *
Re: Syntax Help
« Reply #2 on: 19 Mar 2008, 15:59:57 »
For the trigger, assign the result to a variable:

Code: [Select]
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....

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Syntax Help
« Reply #3 on: 19 Mar 2008, 16:16:42 »
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.

Offline dolty666

  • Members
  • *
Re: Syntax Help
« Reply #4 on: 19 Mar 2008, 16:37:58 »
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.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Syntax Help
« Reply #5 on: 19 Mar 2008, 16:58:28 »
Give a name to the trigger, lets say tr1, then instead of the marker just use the coords of the trigger:
Code: [Select]
getPos tr1