Jump to content
Sign in to follow this  
Rexxenexx

Why doesnt winner=1 in this script?

Recommended Posts

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">enableRadio false

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam = "CAMERA" camCreate [ _camx, _camz, _camy+100]

_cam cameraEffect ["internal", "Back"]

_cam CamSetTarget camtarget1

_cam CamCommit 0

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-10, _camz-10, _camy+40]

_cam CamSetTarget camtarget1

_cam CamCommit 7

~7

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-15, _camz-15, _camy+15]

_cam CamSetTarget camtarget2

_cam CamCommit 7

~7

_campos = GetPos cam2

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx, _camz, _camy+7]

_cam CamSetTarget camtarget2

_cam CamCommit 20

~24

Titletext ["","BLACK OUT",4]

~6

winner=1

exit<span id='postcolor'>

I have to put winner=1 at the top for it to work. How come it doesn't work at the end?

Share this post


Link to post
Share on other sites

? Looks like it should work, are you sure the problem isn't something else? Are you checking winner variable after a long time? 40s?

Share this post


Link to post
Share on other sites

I have a trigger with winner==1 Condition, doesnt work if winner=1 is at bottom of script

Share this post


Link to post
Share on other sites

THX bigtime for the quick replys! smile.gif

I had what you said in the init.sqs:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

winner=0

looser=0

exit<span id='postcolor'>

Something to do with cam script? as I said earlier winner=1 works if I just cut-n-paste it so win.sqs looks like this:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

winner=1

enableRadio false

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam = "CAMERA" camCreate [ _camx, _camz, _camy+100]

_cam cameraEffect ["internal", "Back"]

_cam CamSetTarget camtarget1

_cam CamCommit 0

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-10, _camz-10, _camy+40]

_cam CamSetTarget camtarget1

_cam CamCommit 7

~7

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-15, _camz-15, _camy+15]

_cam CamSetTarget camtarget2

_cam CamCommit 7

~7

_campos = GetPos cam2

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx, _camz, _camy+7]

_cam CamSetTarget camtarget2

_cam CamCommit 20

~24

Titletext ["","BLACK OUT",4]

~6

exit<span id='postcolor'>

Share this post


Link to post
Share on other sites

I guess this winner=1 is to end a mission?

If so, you will find that it will take a second or 2 to do so.

RED

Share this post


Link to post
Share on other sites

CORRECTION!!! sorry it worked this way it DIDNOT work in any of the scripts above:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

winner=1

~1

enableRadio false

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam = "CAMERA" camCreate [ _camx, _camz, _camy+100]

_cam cameraEffect ["internal", "Back"]

_cam CamSetTarget camtarget1

_cam CamCommit 0

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-10, _camz-10, _camy+40]

_cam CamSetTarget camtarget1

_cam CamCommit 7

~7

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-15, _camz-15, _camy+15]

_cam CamSetTarget camtarget2

_cam CamCommit 7

~7

_campos = GetPos cam2

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx, _camz, _camy+7]

_cam CamSetTarget camtarget2

_cam CamCommit 20

~24

Titletext ["","BLACK OUT",4]

~6

exit

<span id='postcolor'>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Espectro @ Sep. 17 2002,09wow.gif)</td></tr><tr><td id="QUOTE">I dont know if it matters, but isnt it:

winner = 1

and not:

winner=1

Dont know if it matters, but worth a thought <!--emo&smile.gif<span id='postcolor'>

I tried that just for kicks, but white space doesn't matter I guess confused.gif

Thanks though smile.gif

EDIT: I also tried to terminate the cam before winner=1 by

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_cam CameraEffect ["terminate", "back"]

CamDestroy _cam<span id='postcolor'>

didnt work.. mad.gif

I made a winnerTRUE.sqs:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

winner=1

exit

<span id='postcolor'>

and tiggered it w/ []exec "winnerTRUE" line at the end of the winner.sqs still doesnt work confused.gif

Share this post


Link to post
Share on other sites

Try putting a 2 second gap before you exit the script:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">winner=1

~2

exit<span id='postcolor'>

wow.gif PEACE

Share this post


Link to post
Share on other sites

Try taking exit out, are you sure you are checking winner = 1 correctly?

RED

Share this post


Link to post
Share on other sites

Nothin' worked with winner=1 after the cam stuff, but thx RED for the input. Well I wish I could upload here, I zipped the mission. So if someone could see what Im doin' wrong please help, I UPed it under http://www.roemedia.com/ MessageBoards-OperationFlashpoint-WINNER!=1 -thread-.

Sorry for the hunt  tounge.gif  But I must be doin' something wrong and this is the only way you guys can see everything.

TIA all!

Share this post


Link to post
Share on other sites

I GOT AN IDEA! is there a command to do "End1", instead of the trigger "End1" deal?confused.gif??

EDIT: I did look through comref btwn couldnt find anythin'

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (RalphWiggum @ Sep. 18 2002,08:12)</td></tr><tr><td id="QUOTE">forceend

forceend

forceend

forceend

forceend

forceend

forceend

forceend

hope that helps smile.gif<span id='postcolor'>

OMG WHOOLLLY LORD!!!! IT WORKED!!!!!!!! biggrin.gif

Now I don't have to jump out of my window!!!!! Good thing to cause im 8 stories high. wink.gif WHOOHOOO!!!

THX MAN!!!! is this the proper way of using forceend?:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">enableRadio false

Titletext ["","BLACK OUT",3]

~3

Titletext ["","BLACK IN",3]

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam = "CAMERA" camCreate [ _camx, _camz, _camy+100]

_cam cameraEffect ["internal", "Back"]

_cam CamSetTarget camtarget1

_cam CamCommit 0

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-25, _camz-25, _camy+40]

_cam CamSetTarget camtarget1

_cam CamCommit 7

~7

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx-50, _camz-50, _camy+25]

_cam CamSetTarget camtarget2

_cam CamCommit 7

~7

_campos = GetPos cam1b

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx, _camz, _camy+25]

_cam CamSetTarget camtarget2

_cam CamCommit 12

~12

_campos = GetPos cam2

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam camSetPos [ _camx, _camz, _camy+7]

_cam CamSetTarget camtarget2

_cam CamCommit 12

~12

Titletext ["","BLACK OUT",4]

~2

4 fadeMusic 0

~3

_cam CameraEffect ["terminate", "back"]

CamDestroy _cam

winner=1

forceend

exit<span id='postcolor'>

or do I not need exit?

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  

×