Jump to content
Sign in to follow this  
aspire

Random Weaponscaches

Recommended Posts

I basically want weaponscaches to pop up inside buildings in towns at random and place a red area marker with like 200 meters intersected.

I could dig through the insurgency code and grab that, but to say the truth the scripting of the insurgency mode is horrifyingly complex.

Share this post


Link to post
Share on other sites

One way to do it would be to group ammo crates to empty markers inside buildings. You may need to find a way to adjust height though. Then just get the position of the crate and create a marker on it.

Share this post


Link to post
Share on other sites

I can't really see in what way that relates to my question, sorry.

Share this post


Link to post
Share on other sites

the simple novice way (wich is my way) is to do what jakerod suggested.Place an ammo box on the map and give it a name(i'll use the name ammoBox in this example).Place markers on buildings you want the ammo box to have a chance to spawn in.Group (f2) the ammo box with all of the markers.Keep in mind the markers will have to be placed over a certain part of the building, as you probably want the ammo to be in certain "rooms";

Now, place a 1 small trigger 5x5 or 10x10..w/e.. over each marker.now, Group the ammobox with each trigger.Go in and edit one of the placed triggers after grouping the ammobox and the trigger(s).You will notice the trigger type is vehicle present.Meaning the condition of the trigger is: if the vehicle (ammo box) is present then activate the trigger.

Next, this is the tedious time consuming part (for me anyhow).In each triggers OnAct put: ammoBox setPos [(getPos ammoBox select 0),(getPos ammoBox select 1),7];

The above is to set the height of the ammoBox.Since you may want the ammoBox upstairs in a building in a specific room.Adjust the height of the object by adjusting the value at the end, in my example the height of the ammoBox is 7 meters.You will have to do this for each trigger.

To summarize, what this does is A. Spawn the ammo box in a random location(via markers) and B. sets the height of the ammoBox(via trigger "vehicle present")

Keep in mind that most times the height needed will vary for each spawn location.The height can be as simple as whole numbers or (if your a perfectionist) it will come down to decimals, ie: 7.250 or w/e to get it just right.

you can do this for as many ammoboxes as you like, you just have to create new random spawn markers and triggers for each box and just remember it can get time consuming depending on (marker/trigger count) how random you want it and how many boxes you want.

ALSO, to randomize it even further you can set the probability of presence of each ammoBox t0 50% or w/e.So you wont know for sure if it exists, and with the random spawn you wont know where it may be if indeed it does exist. unless ofcourse you want to know for sure where it is then just create a marker on the ammobox when/if it spawns in.There is also the condition of presence you can tinker with to randomize it even further.

Idk if i've explained this well enough, i hope it helps.

Edited by Iceman77

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  

×