OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mr.Cool on 16 Aug 2004, 20:01:34

Title: Script prob
Post by: Mr.Cool on 16 Aug 2004, 20:01:34
This is the script I am haveing a prob with...
Quote
?!(_West == West _Police): _Civilan GlobalChat "Police..police...do you hear me...I NEED HELP!!!"; Exit

I just need to know what to put where it says _Police...this is a script for my RPG that I have and I want a script so you can call the cops.
Title: Re:Script prob
Post by: Blanco on 16 Aug 2004, 20:14:58
You need to know what that _West variable stands for.

Can you post the whole script?

Title: Re:Script prob
Post by: Mr.Cool on 16 Aug 2004, 20:24:18
that is the whole script...I am new to this.
Title: Re:Script prob
Post by: macguba on 16 Aug 2004, 20:26:06
If you are new to scripts then, before going any futher, go to the Editors Depot and read snYpir's A Friendly Intro to Code Snippets and also Johan Gustafsson's Scripting Tutorial.
Title: Re:Script prob
Post by: LCD on 16 Aug 2004, 22:36:40
what exactly r u checking in the condition line ?

Quote
?!(_West == West _Police):

cuz the _var r private 4 ur script nd if that the whole script ur checking 4 nothing :P

LCD OUT
Title: Re:Script prob
Post by: Mr.Cool on 17 Aug 2004, 03:51:59
I am trying to make it so West guy on action menu presses the button and has
Quote
"Police..police...do you hear me...I NEED HELP!!!"

come up on globlechat.
Title: Re:Script prob
Post by: Mud_Spike on 17 Aug 2004, 08:06:12
Put this in the init-field of the unit:
Code: [Select]
this addAction ["Shout for help", "shout.sqs"]
then create a file named shout.sqs in your mission folder and put this in it:
Code: [Select]
_this select 1 GlobalChat "Police..police..I need help tying my shoelaces..anyone?"
Title: Re:Script prob
Post by: Mr.Cool on 17 Aug 2004, 15:50:17
thank you...its all that I wanted.
Title: Re:Script prob
Post by: LCD on 17 Aug 2004, 15:52:06
then solve the thread ;)

the solve buttun shud b around there ^ somwere ;)

LCD OUT