Home   Help Search Login Register  

Author Topic: Problems with titleParam  (Read 1544 times)

0 Members and 1 Guest are viewing this topic.

srk

  • Guest
Problems with titleParam
« on: 02 Aug 2006, 17:50:22 »
I'm trying to make a script which allows the admin to select difficulty level at the begin of the mission with titleParam. Basicly it should increase the skill of the enemy, once a harder difficulty is selected. The problem is that their skill level wont increase. ??? Everything else works fine - no errors or anything.
Here's the scripts I made...

description.ext
Code: [Select]
titleParam1 = "Difficulty";
valuesParam1[] = {1,2,3};
defValueParam1 = 2;
textsParam1[] = {"Easy","Normal","Hard"};

difficulty.sqs (gets executed in init.sqs)
Code: [Select]
?(Param1 == 1) : goto "easy"
?(Param1 == 2) : goto "normal"
?(Param1 == 3) : goto "hard"

#easy
hint format["%1",skill enemy1]
goto "exit"

#normal
"_x setSkill 0.5" foreach terrorists
~5
hint format["%1",skill enemy1]
goto "exit"

#hard
"_x setSkill 1" foreach terrorists
~5
hint format["%1",skill enemy1]
goto "exit"

#exit
exit

The hint always shows enemy1's skill as 0.2, even if I select harder difficulty.
I also made a trigger that covers the whole map and wrote terrorists = thisList; on it's activation field, activation = Resistance (the enemies).

Please help! :'(

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: Problems with titleParam
« Reply #1 on: 02 Aug 2006, 18:38:50 »
execute your script from a trigger once the map is loaded
maybe add a delay of 0.5 seconds

condition: true
on activ: [] exec "difficulty.sqs"

srk

  • Guest
Re: Problems with titleParam
« Reply #2 on: 02 Aug 2006, 19:04:11 »
execute your script from a trigger once the map is loaded
maybe add a delay of 0.5 seconds

condition: true
on activ: [] exec "difficulty.sqs"
Well that was simple. Seems to work fine now. Thanks a lot. :)