OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: zip on 06 May 2003, 19:36:34

Title: needs help
Post by: zip on 06 May 2003, 19:36:34
hi I needs a script....... it shall be activated via the Action menu and the action name must be "use Radio" after you use that command ( close to a special radio ) a sidechat must appear... if thats possible I would be soooooooooo happy and the person/persons who helps me out will get thir name in "credits"

please indclude a demo mission ;)
Title: Re:needs help
Post by: zip on 06 May 2003, 20:32:45
ohhhhhhhh come on guys please help me out here =(
Title: Re:needs help
Post by: Knut Erik on 06 May 2003, 20:36:55
I'll help you out as best as I can...  ;D
Title: Re:needs help
Post by: Knut Erik on 06 May 2003, 21:06:22
Done! Tada!!  ;D :o ;D

Just load the mission on dessert island.
Put the folder to
Operation Flashpoint\Users\Yourname\Missions and enjoy.
See the radio.sqs file for info about how you do it and creates actions!

Just ask for more explanation if you need!  ;)
Title: Re:needs help
Post by: CrashnBurn on 06 May 2003, 21:07:15
put the line below in the players ini.

radiochat = player addaction ["Use Radio", "radio.sqs"]

copy the script below and save it as radio.sqs and put it in your mission folder. I named the officer 'of1'. Be sure you name him and use the same name in the script.

player removeaction radiochat
player sidechat "hello ? can anyone hear me ?! I need to talk to company stürmtrop. company stürmtrop do you read me?!"
~10
of1 sidechat "shhhhhh...we have been...we have a new...shhhhh...we have a new position...its on the airport...outside saint phillippe..."
~5
player sidechat "okay we are going to your location...have you captured any planes for the airport..."
~5
of1 sidechat "sure...shhhhhhh we have...c-47...you know how to fly one ?!...shhhhhhhh..."
~5
player sidechat "yeah an old frind of mine has been trained for our planes in 2 months..."
~5
of1 sidechat "shit we are taking heavry fire hurry up...argh!!!!!!!!! shhhhhhhhh..."

exit
Title: Re:needs help
Post by: Iwesshome on 06 May 2003, 21:10:41
Why an "action" type? What prevents the player from using it to early?

Title: Re:needs help
Post by: CrashnBurn on 06 May 2003, 21:14:32
Ok, instead of putting the addaction line in the players ini, just make a trigger with the condition-

player distance radio < 10

In the onactivation-

radiochat = player addaction ["Use Radio", "radio.sqs"]
Title: Re:needs help
Post by: zip on 06 May 2003, 21:30:59
thanks for all your help but I think that EirkÂ's script was the best ;)