Home   Help Search Login Register  

Author Topic: Making Text global  (Read 658 times)

0 Members and 1 Guest are viewing this topic.

pazuzu

  • Guest
Making Text global
« on: 26 Jun 2005, 18:26:56 »
I'm trying to make a little script to display text & teleport players into planes that are in fleight.

The script is called by addaction.

The Mission starts with two female Amazons getting shot down in a chopper & players have to find the downed chopper & pilots to get info from them using addaction. This should activate script to create text(I'm using titletext & sidechat) & to teleport players into planes which are already on way to next objective.

I dont much about scripting but here is what I tried:

info.sqs:

a1 setCombatMode "BLUE"
a2 setCombatMode "BLUE"
a3 setCombatMode "BLUE"
a4 setCombatMode "BLUE"
a5 setCombatMode "BLUE"
a6 setCombatMode "BLUE"
a7 setCombatMode "BLUE"
a8 setCombatMode "BLUE"
a9 setCombatMode "BLUE"
a10 setCombatMode "BLUE"
a11 setCombatMode "BLUE"
a12 setCombatMode "BLUE"
~1
b1 setdammage 1
b2 setdammage 1
b3 setdammage 1
b4 setdammage 1
b5 setdammage 1
b6 setdammage 1
col removeAction 0
TitleText ["You might as well tell us where your leader and base are...","Plain"]
~8
TitleText ["Ok!..Ok!...Don't shoot!","Plain"]
~8
TitleText ["Go north all the way up the inlet and you'll find what you're looking for...","Plain"]
~8
man sidechat "OK GUYS, LOOKS LIKE WE'RE GONNA MOVE UP NORTH IN THE NEXT FEW HOURS..."
~5
[] exec "plane.sqs"
info=true
exit

plane.sqs:

0 fadesound 0
enableradio false
TitleCut ["","BLACK OUT",5]
plane1 setfuel 1
plane2 setfuel 1
plane3 setfuel 1
plane4 setfuel 1
~5
TitleText ["Four hours later...","Plain"]
skiptime 4
~0
unassignVehicle p1
unassignVehicle p2
unassignVehicle p3
unassignVehicle p4
unassignVehicle p5
unassignVehicle p6
unassignVehicle p7
unassignVehicle p8
unassignVehicle p9
unassignVehicle p10
unassignVehicle p11
unassignVehicle p12
~.05
plane1 flyinheight 600
plane2 flyinheight 600
plane3 flyinheight 600
plane4 flyinheight 600
~.05
deletevehicle pbr1
deletevehicle pbr2
~.05
? alive p1 : p1 moveincargo plane1
? alive p2 : p2 moveincargo plane1
? alive p3 : p3 moveincargo plane1
? alive p4 : p4 moveincargo plane2
? alive p5 : p5 moveincargo plane2
? alive p6 : p6 moveincargo plane2
? alive p7 : p7 moveincargo plane3
? alive p8 : p8 moveincargo plane3
? alive p9 : p9 moveincargo plane3
? alive p10 : p10 moveincargo plane4
? alive p11 : p11 moveincargo plane4
? alive p12 : p12 moveincargo plane4
~0
plane1 setpos getmarkerpos "m1"; plane1 setpos [getpos plane1 select 0,getpos plane1 select 1, (getpos plane1 select 2)+1000];
plane2 setpos getmarkerpos "m2"; plane2 setpos [getpos plane2 select 0,getpos plane2 select 1, (getpos plane2 select 2)+1000];
plane3 setpos getmarkerpos "m3"; plane3 setpos [getpos plane3 select 0,getpos plane3 select 1, (getpos plane3 select 2)+1000];
plane4 setpos getmarkerpos "m4"; plane4 setpos [getpos plane4 select 0,getpos plane4 select 1, (getpos plane4 select 2)+1000];
~12
TitleCut ["Approaching Drop Point","BLACK IN",15]
heli setdammage 1
aaguy setdammage 1
aaguy2 setdammage 1
deletevehicle oh1
deletevehicle col
deletevehicle maj
[[amazon7,amazon8,amazon9,amazon10,amazon12],[amazon10],[amazon10],grp1,4,0.00] exec "ai\grouplink2.sqs"
enableradio true
0 fadesound 5
exit

The text only shows for player that chooses action and if the player is still in boat when plane.sqs is called they dont teleport and are stuck at 1rst obj.

This is probobly over my head but I'd like to try to make this happen.

Thanks.

CopyrightPhilly

  • Guest
Re:Making Text global
« Reply #1 on: 26 Jun 2005, 19:06:14 »
only way that comes to mind...

because ur using the action menu it will only effect the player that uses the action...

so in the action script use somthing like:
Code: [Select]
showmytext=true
publicVariable "showmytext"
exit

in your init.sqs
Code: [Select]
[] exec "filename.sqs"
in filename.sqs
Code: [Select]
@showmytext

all your code here

theres probely an easyer way but thats the only way that comes to my mind

cheers,
Phil

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Making Text global
« Reply #2 on: 26 Jun 2005, 22:27:32 »
If you are going to display more than just a little bit of text like this, then CopyrightPhilly's method is going to get pretty annoying.

Try using the CoC's Network Services II for an easy solution. Their "fnRemoteCall" function is exactly what you need.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!