Home   Help Search Login Register  

Author Topic: Ironman's Questions  (Read 1113 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Ironman's Questions
« on: 28 Mar 2008, 05:34:13 »
1) Adjusting difficulty (increase/decrease aiming skill of AI)

Do I have to declare side East as a variable to get it to work?

Description:
Code: [Select]
titleParam1 = "Difficulty";
valuesParam1[] = {.2, .5, .9};
defValueParam1 = .5;
textsParam1[] = {"Easy", "Normal", "Hard"};

init:
Code: [Select]
east setSkill["aimingAccuracy", (param1)];


2) Making Say work
     I use .ogg format, mono type. Put neccessary crap in description for CfgSound. However, gives error on trigger activation field and won't play when I put code on a soldier/game logic.

Activation field in Editor:
Code: [Select]
s1 Say "insertion"

s1 = soldier's name
insertion is name of sound file I want played.

3) Making Side Chat work
         So, throughout a mission I want there to be SideChat between two groups.

Activation field in Editor:
Code: [Select]
QRT sideChat "The base is to the North East of the checkpoint position"

QRT is not a assigned group name. Maybe this is a problem?
TS3 IP: tor.zebgames.com:9992

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Ironman's Questions
« Reply #1 on: 28 Mar 2008, 10:07:24 »
1) Yes, of course. There's no way to set the whole of the east (OPFOR) side to anything using a simple variable like that. :) The most popular solution for selecting everyone of a certain side is using a simple trigger:

Set up a trigger, name it something like all_east. Make the trigger area cover the whole of the island, or just all the opfor units you want to be affected. Set its activation to "OPFOR" and "Present", and make it repeatedly (just in case). Now you've got a list of all the OPFOR units on the map!

In your script, you can access this list simply by writing something like:

Code: [Select]
East_Units = list all_east;
And then you can assign aimingskill to your AI by using, for instance, forEach:

Code: [Select]
{_x setSkill ["AimingAccuracy", param1]} forEach East_Units;
I'm not entirely sure what you're doing in the description.ext with stuff like that, though...I'm not entirely sure first of all how you'd get the variables from there, and secondly it'd be far easier to just assign them to say a global variable in the init.sqf/run a script of some kind that decides these things.

2) No need to ask the same question in two places. Take a look at your original thread :)

Wolfrug out.



"When 900 years YOU reach, look as good you will not!"

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Ironman's Questions
« Reply #2 on: 28 Mar 2008, 10:12:35 »
Ahh, you stopped one short.... lol.... what about #3.
TS3 IP: tor.zebgames.com:9992

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Ironman's Questions
« Reply #3 on: 28 Mar 2008, 10:33:43 »
Oh, right... :D

SideChat doesn't work on whole groups, it works on singular units. For instance
Code: [Select]
Player sidechat "Blah blah" But to make a group sidechat something, the best way is usually by making the leader say it, since there's always a leader of every group. So say you first name your group 'Group1' by putting this into any group member's init field:

Code: [Select]
Group1 = group this
Now, you can access the leader of Group1 by using the leader command. So to make the 'group' sidechat the text, simply write:

Code: [Select]
(leader Group1) sideChat "The base is to the North East of the checkpoint position"
Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"