Home   Help Search Login Register  

Author Topic: Skill Set?  (Read 949 times)

0 Members and 1 Guest are viewing this topic.

RedFaction

  • Guest
Skill Set?
« on: 21 Jun 2006, 22:55:51 »
Quick Question: In a trigger how to i set the skill of a unit called ebmp1

is it something like ebmp1 setskill 1 ???





how would i call it in a script?

so then i could.. if u get the jist..

Trigger: Param1 > 2

Init: this exec "hard.sqs"

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Skill Set?
« Reply #1 on: 21 Jun 2006, 23:44:43 »
As far as I remember setSkill was only for persons, so:
Code: [Select]
commander ebmp1 setSkill 1.0

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: Skill Set?
« Reply #2 on: 22 Jun 2006, 10:26:39 »
I once did this for units I wanted to be tougher;
Name them all and have a trigger on ur map, in condition field type true
activation type: egroups = [e1,e2,e3,e4,e5,e6,e7,...];

Make a description.ext with in it:
Code: [Select]
//                                        AI Skill
//
titleParam1 = "Difficulty:";
valuesParam1[] = {0,1,2};
defValueParam1 = 1;
textsParam1[] = {"Hard","Normal","Easy"};


and then have a script skill.sqs

Code: [Select]
?(param1==0): goto "hard";
?(param1==1): goto "normal";
?(param1==2): goto "easy";

#hard
{_x setSkill 0.75} forEach egroups;
exit;

#normal
exit;

#easy
{_x setSkill 0.25} forEach egroups;
exit;

edit:

If you want to do this for SP, then don't make the description.ext
Make 2 radio triggers on the map (alpha - bravo)
Condition: this
Activation: [easy] exec "skill.sqs"

or

Condition: this
Activation: [hard] exec "skill.sqs"

and have ur skill.sqs
Code: [Select]
_skill = _this select 0
? _skill == easy : goto "easy"
? _skill == hard : goto "hard"

#easy
{_x setSkill 0.25} forEach egroups;
exit;

#hard
{_x setSkill 0.75} forEach egroups;
exit;
not using the trigger will make you play the AI with the skill you set them.
« Last Edit: 22 Jun 2006, 10:45:41 by Seven »