Home   Help Search Login Register  

Author Topic: MP scripting  (Read 1430 times)

0 Members and 1 Guest are viewing this topic.

BRAVO-TWO

  • Guest
MP scripting
« on: 02 Apr 2004, 13:31:15 »
guys ive read all the posts on public variables but im still missing something...
i have a mission completed all works well  except one piece .
during the intro a "deploy"script is called  this makes paras
exit aircraft .. now if im testing in editor all works as it should
but when i test in mp with clan sometimes the script works sometimes it dosnt i call the script from the intro with the line
[groupname,aircraft] exec"deploy.sqs"
is there a way to make sure all players see the script
ive tried experimenting with public variables but like i said im missing something (a brain i think)

BRAVO-TWO

  • Guest
Re:MP scripting
« Reply #1 on: 02 Apr 2004, 13:45:51 »
do i need to run this script on the server for all to see?
forgive my ignorance but this has got me plucked

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:MP scripting
« Reply #2 on: 02 Apr 2004, 14:48:33 »
If the intro script runs on all computers (you haven't done any tricks) then the deploy script should run on all computers too.

Can you post both the intro and deploy script here. Maybe we can pinpoint a soft spot.
If they're long, you can always attach them as txt files for easier viewing.
Not all is lost.

BRAVO-TWO

  • Guest
Re:MP scripting
« Reply #3 on: 02 Apr 2004, 17:14:01 »
ive manged to get around it by calling script from a trigger
but here are the codes i was using
i would preffer to use a script as triggers are unpredictable

INTRO


?(param1) == 1: goto "start"
?(param1) == 0: goto "end"

#start

EnableRadio False


titlecut ["","BLACK IN",5]

[] exec"talk.sqs"
_i = 0

_cam = "camera" camcreate [0,0,0]  
_cam cameraeffect ["internal", "back"]  
_cam camsettarget vehicle chop  
_cam camsetrelpos [60,30,30]  
_cam camSetFOV  .5
_cam camcommit 0
@camcommitted _cam


#loop1
_cam camsettarget vehicle chop
_cam camsetrelpos [60,30,30]  
_cam camSetFOV .5
_cam camcommit 0
~0.01
_i = _i + 1
?(_i < 350): goto "loop1"

titlecut ["","BLACK in",1]

[seal,helo] exec"deploy.sqs"

 

_cam cameraeffect ["terminate", "back"]  
camdestroy _cam  
 
_cam = "camera" camcreate [0,0,0]  
_cam cameraeffect ["internal", "back"]
   

_cam camSetTarget chop
_i = 0
#loop2
  _cam camSetRelPos [cos((getdir chop) + _i) * 70,sin((getdir chop) + _i) * 10,0]
  _cam camCommit 0

  @camCommitted _cam
  ~0.01
  _i = _i + 1
?(_i < 360):goto "loop2"

~17

titlecut ["","black out",4]
~3
titlecut ["","black in",4]

titleRsc ["intro7", "PLAIN"]
 
_cam cameraeffect ["terminate", "back"]  
camdestroy _cam

deleteVehicle chop
deletevehicle a1
deletevehicle a2
deletevehicle a3
deletevehicle a4
deletevehicle su1
deletevehicle su2

EnableRadio True

#end
skiptime  1


exit

     deploy sqs

PlayMusic"bravo"

_Group = _this select 0
_Vehicle = _this select 1


_listunits = units _Group

_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
Unassignvehicle (_listunits select _A)
_A=_A+1
~2
?_B >_A:goto "KEEPSENDING"
~2
MoveNext = TRUE
~.5
_dir = getdir chop
_type = "CWKZodiac"
_pos = getpos chop
_group = dudseal

su1 = _type createVehicle  [1526.46,4862.18,126.44]
su1 setDir _dir
su1 setpos [_pos select 0, _pos select 1, (_pos select 2) -2]

~.01
_x = 100 * sin _dir
_y = 100 * cos _dir
~3
_dir = getdir chop
_type = "CWKZodiac"
_pos = getpos chop
_group = dudseal

su2 = _type createVehicle  [1526.46,4862.18,126.44]
su2 setDir _dir
su2 setpos [_pos select 0, _pos select 1, (_pos select 2) -2]

~.01
_x = 100 * sin _dir
_y = 100 * cos _dir