Home   Help Search Login Register  

Author Topic: A document script! Look inside>>>>  (Read 768 times)

0 Members and 2 Guests are viewing this topic.

Zoot04

  • Guest
A document script! Look inside>>>>
« on: 09 Oct 2004, 16:31:02 »
I need some one to make me a script where when you walk up to a car,truck,apc or something then it will say pick up documents, then it will give you 2 more options:

1.Burn documents ;D

2.Keep Documents  ;D

Please can someone do this and i will add you to the credits for my mission  ;)

Thanks!

[shadow=green,left,300]Odd one out () () [] () ()[/shadow]      

Loading 5%...................Loading 10% ...................... Loading 26% ............ Loading 100%
 :D
                           

Bluelikeu

  • Guest
Re:A document script! Look inside>>>>
« Reply #1 on: 10 Oct 2004, 14:50:15 »
ok, i think that this is what you want.

This is the first script you'll be needing:
Code: [Select]

;//Found Documents Script:

#Variables
_Unit = _This Select 0
_Veh = _This Select 1
_Dist = _This Select 2

#CheckDistance
@_Unit Distance _Veh <= _Dist

#Addaction
DocLocAction = _Unit addaction ["Locate Documents", "ldocs.sqs"]

#CheckDistance2
@_Unit Distance _Veh > _Dist
_Unit RemoveAction DocLocAction
ExitLDocsScript = True
~1
If(DocsTaken) Then {Goto "Exit"}
Goto "CheckDistance"

#Exit
EndDocScript = True
Exit


This next script(ldocs.sqs) will bring up the two dialog options and will remove them as required:

Code: [Select]

#Variables
_Unit = _This

#Addaction
_ActionA = _This AddAction ["Burn Documents", "burndocs.sqs"]
_ActionB = _This AddAction ["Keep Documents", "keepdocs.sqs"]

#AwaitRemoval
If(ChoseBurnDocs) Then {Goto "ExitBurn"}
If(ChoseKeepDocs) Then {Goto "ExitKeep"}
~0.01
Goto "AwaitRemoval"

#ExitBurn
DocsTaken = True
_Unit RemoveAction _ActionA
_Unit RemoveAction _ActionB
DocumentsBurned = True
DocumentsKept = False
_Unit RemoveAction DocLocAction
Exit

#ExitKeep
DocsTaken = True
_Unit RemoveAction _ActionA
_Unit RemoveAction _ActionB
DocumentsKept = True
DocumentsBurned = False
_Unit RemoveAction DocLocAction
Exit

this is the burndocs.sqs file
will just return ChooseBurnDocs as true when activated

Code: [Select]
ChooseBurnDocs = True

this is the keepdocs.sqs file
will return ChooseKeepdocs as true when activated

Code: [Select]
ChooseKeepDocs = True

ok, i hope that this is the finished copy, haven't tested it out myself yet.

first script name:
founddocs.sqs
second:
ldocs.sqs
third:
burndocs.sqs
fourth:
keepdocs.sqs

just name them like that above

Thanks,
Bluelikeu
« Last Edit: 13 Oct 2004, 11:12:24 by Bluelikeu »

Zoot04

  • Guest
Re:A document script! Look inside>>>>
« Reply #2 on: 11 Oct 2004, 19:47:57 »
TY. but where do i put these  ???


Thanks for the help given

[shadow=green,left,300]Odd one out () () [] () ()[/shadow]      

Loading 5%...................Loading 10% ...................... Loading 26% ............ Loading 100%  ;D
 

Zoot04

  • Guest
Re:A document script! Look inside>>>>
« Reply #3 on: 12 Oct 2004, 17:56:35 »
Does any 1 know where i have to put these  ???


Please  :-\


Thanks for any help given

[shadow=green,left,300]Odd one out () () [] () ()[/shadow]      

Loading 5%...................Loading 10% ...................... Loading 26% ............ Loading 100%  ;D
 

GI-YO

  • Guest
Re:A document script! Look inside>>>>
« Reply #4 on: 12 Oct 2004, 22:20:08 »
When Bluelikeu has finished these scripts you need to put them into notepad and save it as for example "document.sqs". Then save this file into your user mission you want the script in. look in codemasters/users/missions/missionname. Then call the script in the mission with a trigger F3 and put in [] exec "document.sqs". and thats it. just play around with it for a while and it will all make sense i promise.

GI-YO

Bluelikeu

  • Guest
Re:A document script! Look inside>>>>
« Reply #5 on: 13 Oct 2004, 11:14:20 »
OK, done :D :o :P :-\ :o

look at previous post--------/
« Last Edit: 13 Oct 2004, 11:14:55 by Bluelikeu »