Home   Help Search Login Register  

Author Topic: Character list (player) @ end of co-op  (Read 2350 times)

0 Members and 1 Guest are viewing this topic.

rchxenson

  • Guest
Character list (player) @ end of co-op
« on: 13 Dec 2002, 01:55:16 »
Ok so I am trying to do a character list at the end of my co-op and it all works fine untill I have only four players instead of five players.  here is what the script snipit is;

;point the camera at the ap1 and display name
_cam camsettarget ap1
_cam camsetrelpos [0,2,1]
_cam camcommit 6
~6
Titletext ["" + (name ap1),"PLAIN DOWN"]
ap1 playmove "EffectStandSalute"
~5

;display ap2 name and player
_cam camsettarget ap2
_cam camsetrelpos [0,2,1]
_cam camcommit 6
~6
Titletext ["" + (name ap2),"PLAIN DOWN"]
ap2 playmove "EffectStandSalute"
~5

;display ap3 name and player
_cam camsettarget ap3
_cam camsetrelpos [0,2,1]
_cam camcommit 6
~6
Titletext ["" + (name ap3),"PLAIN DOWN"]
ap3 playmove "EffectStandSalute"
~5


Now my problem lies when there is no ap2 player in the game as only two people played that time.  if there is no player there it will hold the camera on player one for a longer time, something I don't like.  How can I check the status of ap2 and if he is not there, not show him or pause at his name.

I have tried many different ways but nothing works...please do not answer unless you really know and have done it.  I have a feeling that I need to put the people into an array at the start of the game and then use that array as the list, is that correct, and if so how do I do it?

Offline KTottE

  • Former Staff
  • ****
Re:Character list (player) @ end of co-op
« Reply #1 on: 13 Dec 2002, 09:33:43 »
You know what you should do?
You should rip apart the MP mission The Beach as it's got this thing working already.

I've not seen any bugs or errors in that one, so I'm assuming it's working 100%.

As it's 90kb even when zipped, I'm gonna have to link you ;)

here it is.

Unzip, UnPBO, see how it's done.
« Last Edit: 13 Dec 2002, 09:36:45 by KTottE »
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

rchxenson

  • Guest
Re:Character list (player) @ end of co-op
« Reply #2 on: 13 Dec 2002, 15:10:58 »
Actually thats the mission that inspired me and I tried to do that but the file is an sqs file that can not be decrypted.  So I am at a loss unless someone knows how to decrypt the sqs files that go along with the mission!?!?!

SO please if you knwo how to do either of these let me know!!
THanks though for the reply above.....it gives me hope yet

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Character list (player) @ end of co-op
« Reply #3 on: 13 Dec 2002, 17:32:23 »
OK, for the reason i'm at work right now, i can't go
into detail, but i'll give you the idea:

Put all of 'em into an array (as you already thought)

Change your cam script this way, that you run it as a
loop, and use the count result of that array above as
the counter for that loop.

Another thing, i've been using far ago to determine which
unit is there and which one not (at start of mission):

Check their presence out of the init.sqs file (which runs
automatically between player selection and first briefing).

Just check in there:

? alive ap1: apA = true
? alive ap1: apB = true
etc.

In your cam script, you could use these boolean's as
condition wether to skip the showing of this unit or not then.

hope there's something in for you

:edit

ah yes, and just a thinking:

your secondary text is more a reason for such guys to post
in here, than if you wouldn't add it. You're looking for anwers,
and some ppl are trying to give them, but i've seen that very
often, that exactly words like yours caused them to do what
you don't want. Again, just a thinking of mine  ;)

~S~ CD
« Last Edit: 13 Dec 2002, 17:40:01 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline KTottE

  • Former Staff
  • ****
Re:Character list (player) @ end of co-op
« Reply #4 on: 13 Dec 2002, 20:12:08 »
Most weird, I get a checksum error when I try to unPBO it.  
Wonder why :-\

Gosh darnit, were you able to unPBO it?
If so, try using PBO Decryptor to do it, as it decrypts files as well.

Otherwise, I apologize for that ;)

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

rchxenson

  • Guest
Re:Character list (player) @ end of co-op
« Reply #5 on: 13 Dec 2002, 20:55:05 »
I can UnPBO it but the sqs files are still encripted anyway to get them unencrypted?
THanks

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Character list (player) @ end of co-op
« Reply #6 on: 14 Dec 2002, 19:24:34 »
Errm is it that script, you are looking for?

I've dloaded the mission, KtottE linked here, and
used UnPBO.exe to decrypt it.

This is the outro i found, and as you can see, it's using
a simple ?alive xx condition, to determine wether the
unit is there or not.


Code: [Select]
5 fadeMusic 1
playMusic "track7"
enableRadio false



~5
_camera = "camera" camCreate [8388.39,4348.80,0.74]
_camera cameraEffect ["internal","back"]


_aunits = units WESTS
_i = 0
_Max = count _aunits

#Here
(_aunits select _i) action ["EJECT",K,L,O,D]
unassignvehicle (_aunits select _i)
_i=_i+1

?_Max>_i:goto "Here"


titleCut ["Mission Completed","PLAIN down",4]
_camera camSetTarget VlajkaRus
_camera camSetRelPos [10,15,2]
_camera camSetFOV 0.900
_camera camCommit 0
@camCommitted _camera
~3
VlajkaRUS setflagtexture "usA_vlajka.pac"
VlajkaRUS SETFLAGSIDE WEST
~4
_camera camSetTarget VlajkaRus
_camera camSetRelPos [5,20,2]
_camera camSetFOV 0.300
_camera camCommit 5
@camCommitted _camera

~4


titleCut ["The Players...","PLAIN down",5]

?(alive ap):goto "avoid"
goto "endrnd"
#avoid
~0.1

ap switchMove "EffectStandTalk"
_ap = _this select 0
_apName = name _ap
_camera camSetTarget ap
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera

titlecut [_apName,"Plain down",2]
~4
#endrnd
titleCut ["","PLAIN down",1]






?(alive ap2):goto "avoid2"
goto "endrnd2"
#avoid2
~0.1

ap2 switchMove "EffectStandTalk"
_camera camSetTarget ap2
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap2 = _this select 1
_ap2N = name _ap2
titlecut [_ap2N,"PLAIN DOWN",2]
~4
#endrnd2
titleCut ["","PLAIN down",1]




?(alive ap3):goto "avoid3"
goto "endrnd3"
#avoid3
~0.1
ap2 action ["EJECT"]
ap3 switchMove "EffectStandTalk"
_camera camSetTarget ap3
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap3 = _this select 2
_ap3N = name _ap3
titlecut [_ap3N,"PLAIN DOWN",2]
~4
#endrnd3
titleCut ["","PLAIN down",1]



?(alive ap4):goto "avoid4"
goto "endrnd4"
#avoid4
~0.1
ap4 action ["EJECT"]
ap4 switchMove "EffectStandTalk"
_camera camSetTarget ap4
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap4 = _this select 3
_ap4N = name _ap4
titlecut [_ap4N,"PLAIN DOWN",2]
~4
#endrnd4
titleCut ["","PLAIN down",1]





?(alive ap5):goto "avoid5"
goto "endrnd5"
#avoid5
~0.1
ap5 action ["EJECT"]
ap5 switchMove "EffectStandTalk"
_camera camSetTarget ap5
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap5 = _this select 4
_ap5N = name _ap5
titlecut [_ap5N,"PLAIN DOWN",2]
~4
#endrnd5
titleCut ["","PLAIN down",1]




?(alive ap6):goto "avoid6"
goto "endrnd6"
#avoid6
~0.1
ap6 action ["EJECT"]
ap6 switchMove "EffectStandTalk"
_camera camSetTarget ap6
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap6 = _this select 5
_ap6N = name _ap6
titlecut [_ap6N,"PLAIN DOWN",2]

~4
#endrnd6
titleCut ["","PLAIN down",1]



?(alive ap7):goto "avoid7"
goto "endrnd7"
#avoid7
~0.1
ap7 action ["EJECT"]
ap7 switchMove "EffectStandTalk"
_camera camSetTarget ap7
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap7 = _this select 6
_ap7N = name _ap7
titlecut [_ap7N,"PLAIN DOWN",2]
~4
#endrnd7
titleCut ["","PLAIN down",1]





?(alive ap8):goto "avoid8"
goto "endrnd8"
#avoid8
~0.1
ap8 action ["EJECT"]
ap8 switchMove "EffectStandTalk"
_camera camSetTarget ap8
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap8 = _this select 7
_ap8N = name _ap8
titlecut [_ap8N,"PLAIN DOWN",2]
~4
#endrnd8
titleCut ["","PLAIN down",1]


?(alive ap9):goto "avoid9"
goto "endrnd9"
#avoid9
~0.1
ap9 action ["EJECT"]
ap9 switchMove "EffectStandTalk"
_camera camSetTarget ap9
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera
_ap9 = _this select 8
_ap9N = name _ap9
titlecut [_ap9N,"PLAIN DOWN",2]
~4
#endrnd9
titleCut ["","PLAIN down",1]




?(alive ap10):goto "avoid10"
goto "endrnd10"
#avoid10
~0.1
ap10 action ["EJECT"]
ap10 switchMove "EffectStandTalk"
_camera camSetTarget ap10
_camera camSetRelPos [1,1,1]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera

_ap10 = _this select 9
_ap10N = name _ap10
titlecut [_ap10N,"PLAIN DOWN",2]
~4
#endrnd10
titleCut ["","PLAIN down",1]
_camera camSetTarget VlajkaRUS_1
_camera camSetRelPos [-20,-20,5]
_camera camSetFOV 0.900
_camera camCommit 0
@camCommitted _camera
~5
_camera camSetTarget VlajkaRus_1
_camera camSetRelPos [5,20,2]
_camera camSetFOV 0.300
_camera camCommit 5
@camCommitted _camera

~4

_camera camSetTarget wreck
_camera camSetRelPos [10,10,2]
_camera camSetFOV 0.900
_camera camCommit 0
@camCommitted _camera
~5
_camera camSetTarget WRECK2
_camera camSetRelPos [5,22,-2]
_camera camSetFOV 0.900
_camera camCommit 10
@camCommitted _camera

~10



5 fadeMusic 0
titleCut ["GAME OVER\n The Beach - By CADman[GUN] \n www.The-GUNfighters.com","BLACK OUT", 6]
~7

player cameraEffect ["terminate","back"]



camDestroy _camera

over=true
 
exit


~S~ CD
« Last Edit: 14 Dec 2002, 19:26:25 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

rchxenson

  • Guest
Re:Character list (player) @ end of co-op
« Reply #7 on: 27 Dec 2002, 23:11:49 »
thats very interesting, I have tried the Alive command but it never seemed to work for me.....I will try and change that for my next coop and use it again.  Very strange why it did not work, I wonder if it is something that I did wrong in my script but it doesn't seem likely
 ;-)