Home   Help Search Login Register  

Author Topic: A lil help plz..List trigger. day 6....  (Read 3431 times)

0 Members and 1 Guest are viewing this topic.

Offline ModestNovice

  • Members
  • *
Re: list trigger contents issues ><
« Reply #15 on: 03 Sep 2008, 02:35:17 »
thts what I did, after you found it once, it moved randomly to one of the 15 logics ;)

ah righto, didnt see what you had wrote.

yeh, yah could do that given that the helicrash is the name of the crashed helo (which i assume it is?).

So yes that should work fine.
« Last Edit: 03 Sep 2008, 02:38:23 by DaChevs »
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline D007

  • Members
  • *
Re: list trigger contents issues ><
« Reply #16 on: 03 Sep 2008, 02:53:58 »
EDIT: Ok.. I gave it a good run..lol..
I'm going to give Mandos another shot for a while..
now that I know it needed to be in an sqf and not an sqs.
that should help..lol..

but i left off.. pretty much exaclty as you left it.. I tried a lot..
nothing went well..lol.. Kept paying me at mission start.

Heya Mando..
I get what you were saying to do more now.
So I rearranged things to be what i think you intended me to do.
The 1st script below moves the trigger to the "helicrash" (which is the object uh60 wrecks) name.
It does so at the last line of the 1st script below.

The trigger is named "crash"
The trigger is activated on blufor present.
which runs the script  [] exec "foundcrash.sqf"
the foundcrash script is the 2nd script down.
wether i use your original or my edited version
they both error. :(

randomcrashsite.sqs
Code: [Select]
? !isServer: exit
_randomcrash=random 1
_randomcrashnum=round _randomcrash
_rantime = random 5
?(_rantime < 120):_rantime=_rantime+5
~_rantime
?_randomcrashnum==1:HeliCrash setdir random 360;HeliCrash setpos [((getmarkerpos "CrashSite") select 0) + random 200 - random 200 ,((getmarkerpos "CrashSite") select 1) + random 200 - random 200];CrashmarkerPOSVAR = getmarkerpos "CrashSite";publicvariable "CrashmarkerPOSVAR";"Crashmarker" setmarkerpos CrashmarkerPOSVAR;CrashflagPOSVAR = getmarkerpos "CrashSite";publicvariable "CrashflagPOSVAR";"Crashflag" setmarkerpos CrashflagPOSVAR;crash setPos getPos helicrash;

exit

The original was paying me double and erroring, so i slimmed it down to this..
foundcrash.sqs
Code: [Select]
_trigger_list = list crash     (also tried as crash = list crash)
{
    {
      if (vehicle _x != _x) then
       {
          if (isPlayer _x) then
          {
             if (alive _x) then
             {
                SPON_playerCashBalance = SPON_playerCashBalance + 5000;
                player groupchat format ["For your efforts in finding the crash site you have been rewarded $5000! $%1 total in pocket 
                cash",SPON_playerCashBalance];
             };
          } forEach crew _x;
       };
    };
} forEach _trigger_list;    (also tried as foreach crash)

exit;

but this is giving me the same errors the original was giving me..
error missing {
or
error missing }
or
} foreach _trigger_list; error missing {
or
error, type array expected object. ( when I put "crash = list crash" in the trigger).

well.. at least it's paying too...lol..
should I have something else in the trigger other than what activates it and what script to run?
do I need to do something like _trigger_list = list crash?
It's all new to me.. been digging around for info on trigger lists and thats all i could really narrow it down to.

well day idk..5? on this crap..up all nite again.....
lil help plz..  :confused:
« Last Edit: 03 Sep 2008, 21:54:31 by D007 »

Offline ModestNovice

  • Members
  • *
Re: A lil help plz..List trigger. day 6....
« Reply #17 on: 04 Sep 2008, 01:24:16 »
well D007, if ya want it to just do this quickly ya can set it in the trigger itself. So, easy as this:

Code: [Select]
Condition: (vehicle player) in thislist

OnAct: reward = 400 + ceil(random 250); (vehicle player) groupchat format ["You found the crash site and earned $%1, you now have $%2", reward, SPON_playerCashBalance]; new_m_pos = ["logic1","logic2","logic3","logic4","logic5","logic6","logic7","logic8","logic9","logic10","logic11","logic12","logic13","logic14","logic15"];
ran_select = new_m_pos select (floor(random(count new_m_pos)));
move_m = crash_site_marker setMarkerPos (getPos ran_select);
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline D007

  • Members
  • *
Re: A lil help plz..List trigger. day 6....
« Reply #18 on: 04 Sep 2008, 02:49:08 »
Cool thanks Chevs :)..
I'll try that.
much appreciated.

Offline ModestNovice

  • Members
  • *
Re: A lil help plz..List trigger. day 6....
« Reply #19 on: 04 Sep 2008, 02:59:56 »
no problem  ;)

lemme know how it works out.
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline D007

  • Members
  • *
List trigger (solved)
« Reply #20 on: 05 Sep 2008, 05:03:13 »
My bro figured out a way to make it work so we went with that.
But I do appreciate the help Chevs. thanks a bunch.
Quarantine Unleashed V1.1 will be out in a day or 2 tops now.

Topic solved :)