Jump to content
Sign in to follow this  
mileset

Random Position

Recommended Posts

i making sniper mission. player and his friends are sniper. and their object is killing offier. but, at first, Player maybe says "wow, cool! its best sniper mission". but, at Second,

player maybe says "oh demn.. i knew all officer's position. so i ts too boring and not fresh." ok.

my question is..

HOW TO I MAKE RANDOM POSITION?

ex) i make two officer. one is on the road(a). other is stay in a

cottage(b). and when i playing, they are must exist, just ONE

if A existed, B is must vanished. and if b existed, a is must vanished.

but i dont know how to make such as it.

plz help me! show me your editing capability!

Share this post


Link to post
Share on other sites

have a look at "Steal the car" official OFP mission to see how it's done in the editor (without scripts)

Share this post


Link to post
Share on other sites

If you want to use scripts, you can use something like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;// launch this script with

;// [nameofofficer1,nameofofficer2] exec "nameofthisscript.sqs"

_OFFICER1= _this select 0

_OFFICER2= _this select 1

;// ask OFP to generate a random number between 0 and 1

_a = random (1)

;// test if this number is superior to 0.5 it will delete officer no 1 and exit

? (_a > .5) : deletevehicle _OFFICER1; exit

;// now if a is inferior to 0.5 it will delete officer no 2 then exit

deletevehicle _OFFICER2

exit

Share this post


Link to post
Share on other sites

Just group (press F2 and drag a line from) the officer to a marker (use invisible ones) and the officer will either be where you placed him or at the marker location at the beginning of the mission.

Wadmann

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  

×