Jump to content
Sign in to follow this  
USMCWall

Insurgency Stlye scripting help

Recommended Posts

Hey, for all of you out there who play BF2s Project Reality mod, you might have a better understanding of what I'm trying to accomplish, and if not I'll explain for those who don't play but are far better scripters than myself. =)

Main focus is I want to basically have multiple areas (at least 10 would be awesome) on a given map that a cache (1 ammo box & sound trigger for searching purposes) could spawn. However, the game would decide which one, one at a time until it were destroyed then generate the next random cache with a marker in the approximate area to let the players know its vicinity. Later on perhaps spawning with it some OPFOR to go along, but the basics would be a good start, if anyone could point me in the right direction that would be awesome.

Share this post


Link to post
Share on other sites

First of all, you could create the areas you want by placing markers, named "area_X", where X would be an increasing number starting at 1.

Then in your init.sqf script, you would create a variable to hold the number of areas. Then make a for-loop from 1 to 1000, to actually count the number of areas by checking the existance of markers by concatenating "area_" and the current iterator-number. If the marker exists, you increase the variable that holds the total number of areas. If the area doesn't exist, you break the loop.

BRB, gonna continue this post on my phone. Takes too fucking long with a PlayStation 3 controller xD

Share this post


Link to post
Share on other sites

Wasn't aware that something like PR's existed in ArmA, I'll have to look into it, thanks.

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  

×