Jump to content
Sign in to follow this  
Kendo J

Converting OFP scripting to arma1, 1st of many questions

Recommended Posts

Ok so I played OFP alot back in the day.

I have Arma and sometimes mess about with it.

But it has been a few years since i scripted, so i am having issues converting the syntax.

if anyone answers me I will have MANY MANY questions.

But the first is

Why does this script line not work in Arma1?

"_x setdammage 0" foreach units Team1

KENDO

Share this post


Link to post
Share on other sites

"_x setdammage 0" foreach units Team1

must be now (and was already used in OFP)

{_x setDammage 0} forEach units Team1

Share this post


Link to post
Share on other sites

Thanks! I knew it was something simple I was doing already... more noobish questions to come!!!

Share this post


Link to post
Share on other sites

Ok...next one, Why doesnt this work... it is a script i use to track freindly AI teams on the map. with a marker. Eventually they will have a respwan script and in that script thier 'empty' marker will be returned to an identifyer like the USMC infantry marker

#loop

~1

if (count units TEAM2 > 0) then {{T2m} setmarkerpos getpos leader TEAM2;} else {{T2m} setmarkertype {empty}}

goto "loop"

Share this post


Link to post
Share on other sites

#loop
~1
if (count units TEAM2 > 0) then {"T2m" setmarkerpos getpos leader TEAM2;} else {"T2m" setmarkertype "empty"}
goto "loop"

marker names and types must be written in double quotation marks.

Share this post


Link to post
Share on other sites

Thanks AGAIN!

I promise I used to be good at this, but starting again I feel like I am learning from Scratch...

How many more nube questions before you get annoyed at me? ;)

Regards

Ken

Share this post


Link to post
Share on other sites
How many more nube questions before you get annoyed at me? ;)

Well as the ancient Greeks said "God helps those who help themselves" and much the same applies here - the community will help those who help themselves so it's probably worth looking at the BIKI when you come across something not working to check for any changes in syntax for instance foreach would have helped on your opening post - by all means keep posting but it's always worth a quick BIKI check prior to doing so...

EDIT : APOLOGIES PLEASE WAS BROWSING THE COMPLETELY WRONG FORUM AND NOT NOTICED THE DATE

Edited by Desrat
STUPIDITY

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×