Jump to content
Sign in to follow this  
Major Fubar

Revealing hidden marker

Recommended Posts

OK, I'm having some trouble with a mission I'm working on.

I've read most of the tutorials on the subject, but I'm still doing something wrong.

I have a hidden marker that should be revealed once the players have completed a certain number of objectives. In the trigger for each objective I have "Goals=Goals+1". I then have a seperate trigger which has the condition "Goals>=3" to reveal the marker (in the init.sqs I have declared "marker1" SetMarkerType "Empty", and in the trigger "marker1" SetMarkerType "Pickup").

Why isn't this working? Do I need to declare Goals=0 in the init.sqs? I thought all variables defaulted to 0 when first called.

On a related note, is there any way to use a group score as a trigger to reveal the marker? How do I detect what the group score is - do I need to create a variable and then add every players individual score to it?

TIA - Fubar

Share this post


Link to post
Share on other sites

Ahh, declaring Goals=0 in the init.sqs did the trick biggrin_o.gif

Still, I'd still like to know about detecting the score if possible wink_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]I thought all variables defaulted to 0 when first called.

Well as you have just found - no they don't.  Neither do the default to false either. Each variable should be explicitly created before it is used.
Quote[/b] ]I'd still like to know about detecting the score if possible  
Have you checked out the commands: score and rating?

http://www.ofpec.com/editors/comref.php?letter=S#score

http://www.ofpec.com/editors/comref.php?letter=R#rating

Maybe you could get them towork the way you want.

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  

×