Home   Help Search Login Register  

Author Topic: Activating A Script With One And A Variable  (Read 753 times)

0 Members and 1 Guest are viewing this topic.

Suicide

  • Guest
Activating A Script With One And A Variable
« on: 09 Jul 2004, 14:01:25 »
Hi All,
I Have This :

Code: [Select]

_A=Name S1
?_A==Name Player:GoTo "A"
Exit
#A
S1 SwitchMove "Para"
S1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),2500]
S1 AddAction ["Pull Chute","HALO1.Sqs"]
~2
#B
?_A<150:Exit
~.25
L1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),0]
_A=L1 Distance S1
_B=Speed S1
_Z=Format["Altitude: %1\nSpeed: %2",_A,_B]
TitleText[_Z,"Plain Down",.1]
GoTo "B"


And That

Code: [Select]

TitleText["","Plain Down",.1]
_P="ParaChute" CreateVehicle GetPos S1
_P SetPos GetPos S1
_V=VeloCity S1
S1 AssignAsDriver _P
S1 MoveInDriver _P
_P SetVeloCity _V
S1 RemoveAction A1
#A
~1
L1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),0]
_A=L1 Distance S1
_Z=Format["Altitude: %1",_A]
TitleText[_Z,"Plain Down",.1]
?_A<10:GoTo "B"
GoTo "A"
#B
DeleteVehicle L1
TitleText["","Plain Down",1]
Exit


It's A HALO Script If You Wish To Know  :P

Well, I Need To Know How To Do A Variable For Stopping The First Script When It Launch The Second. My English Is limited Lol, I Hope You Understand What I Ask  :-\ ...

If Not, Tell Me To Be More Precise About What...

ponq

  • Guest
Re:Activating A Script With One And A Variable
« Reply #1 on: 09 Jul 2004, 14:07:57 »
first script:
Code: [Select]
SecondScriptIsRunning = False
_A=Name S1
?_A==Name Player:GoTo "A"
Exit
#A
S1 SwitchMove "Para"
S1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),2500]
S1 AddAction ["Pull Chute","HALO1.Sqs"]
~2
#B
?SecondScriptIsRunning : exit
?_A<150:Exit
~.25
L1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),0]
_A=L1 Distance S1
_B=Speed S1
_Z=Format["Altitude: %1\nSpeed: %2",_A,_B]
TitleText[_Z,"Plain Down",.1]
GoTo "B"

and the 2nd script:

Code: [Select]
SecondScriptIsRunning = true
TitleText["","Plain Down",.1]
_P="ParaChute" CreateVehicle GetPos S1
_P SetPos GetPos S1
_V=VeloCity S1
S1 AssignAsDriver _P
S1 MoveInDriver _P
_P SetVeloCity _V
S1 RemoveAction A1
#A
~1
L1 SetPos [(GetPos S1 Select 0),(GetPos S1 Select 1),0]
_A=L1 Distance S1
_Z=Format["Altitude: %1",_A]
TitleText[_Z,"Plain Down",.1]
?_A<10:GoTo "B"
GoTo "A"
#B
DeleteVehicle L1
TitleText["","Plain Down",1]
Exit


I've added a true/false check and I think this should work.

Suicide

  • Guest
Re:Activating A Script With One And A Variable
« Reply #2 on: 09 Jul 2004, 15:33:13 »
Thanks, It Works  ;D