Home   Help Search Login Register  

Author Topic: Errors with clearcorpse.sqs lag eliminator  (Read 849 times)

0 Members and 2 Guests are viewing this topic.

Mr.BoDean

  • Guest
Errors with clearcorpse.sqs lag eliminator
« on: 22 May 2003, 11:06:40 »
Can't seem to get this script from  dreaming_adam to work. Where am I going wrong?

;clearcorpse.sqs script
#loop
_eunit = list EVERYUNIT
"?(!alive _x):[_x] Exec {delbody.sqs} foreach _eunit"
goto "loop"
exit

;delbody.sqs script
_u = _this select 0
~60
_u setpos [0,0,99999]
deletevehicle _u
exit


Trigger:
Type:Switch
X:99999     Y:99999
Activation: Anybody
Occurrence:Repeatedly
Name: EVERYUNIT

(But no other action/effects/conditions or On Activation parameters set.)

-Scripts placed in mission folder.

Then, It says.... put "[] exec {clearcorpse.sqs}" in any unit's Init. field .... (which I did) ..... or in INIT.sqs .

Is the "[]" ambiguous for either this or the name(s) of specific units?  I also tried both this and S1, but still no corpse or vehicle removal.
    "There were bodies everywhere!"

Please Help ....if I am to believe that extra bodies, vehicles and objects contribute to lag and general slowdown of games (esp. MP) . Thanx!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #1 on: 22 May 2003, 12:22:47 »
Quote
Trigger:
Type:Switch
X:99999    Y:99999
Activation: Anybody
Occurrence:Repeatedly
Name: EVERYUNIT

(But no other action/effects/conditions or On Activation parameters set.)

I didn't take a really deep look into the script itself, but
as i can see it's refering to the list of the trigger: EVERYUNIT,
and looking at your trigger i would say:

Your trigger doesn't get activated at least once

why? - there's no condition in the condition field

fix? - set the condition of the trigger to either: TRUE
or THIS

If it's set to TRUE, the trigger will become active even if the trigger's activation condition doesn't actually match
in this case: anybody present inside the trigger area

If it's set to THIS, the trigger will become active, once any
unit is inside it's area (by the size of the trigger it will happen
right from the start of the mission).

Also you can change the trigger to be activated from repeatedly
to once, as it's not necessary to have a trigger activated
more than once, when only refering to it's LIST.
The array LIST TRIGGERNAME always returns the actual list
of the trigger, even if it's set to be activated ONCE.

hope this helps

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Mr.BoDean

  • Guest
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #2 on: 22 May 2003, 14:09:59 »
Hmmm ....sorry, there is  this already in the trigger from setup. The trigger is definitely large enough to have action in it,but nothing happens.   Anyone have experience with this or other "lag-reducing scripts? And are they that important?
  I mostly play MP games and usually just attribute lag to people's connections or bandwith issues.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #3 on: 22 May 2003, 19:28:23 »
Then i suggest you still should change the activation
of the trigger from REPEATEDLY to ONCE.

I'm not really sure, if it makes a difference, but i'm very sure
that you don't need it to be activated repeatedly as you
are only using this trigger as a referback by it's trigger list.

btw - i found a wrong syntax here:

Quote
"?(!alive _x):[_x] Exec {delbody.sqs} foreach _eunit"

it should be:

"?(!alive _x): [_x] exec {delbody.sqs}" foreach _eunit

:you see the quotation mark's location is different to your
version.


Also you should probably add a time delay to your loop, so
that controll will be given back to the game.

;clearcorpse.sqs script
#loop
_eunit = list EVERYUNIT
"?(!alive _x):[_x] Exec {delbody.sqs} foreach _eunit"

~0.1

goto "loop"
exit


hope this helps then  :)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Mr.BoDean

  • Guest
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #4 on: 23 May 2003, 00:10:04 »
Thanks, Mr. D. , but I now am getting an "Error Invalid Number in Expression". It's always hard to tell whether there is or should be a space between some things (i.e., as your correction had 2 different versions of spacing between the  _x): [_x]  and  _x):[_x] ) .
   I tried both variants but still had same error.   :-\
(FYI , I use Chris's OFP Editor, which can help with Syntax a bit)


Then i suggest you still should change the activation
of the trigger from REPEATEDLY to ONCE.

I'm not really sure, if it makes a difference, but i'm very sure
that you don't need it to be activated repeatedly as you
are only using this trigger as a referback by it's trigger list.

btw - i found a wrong syntax here:it should be:

"?(!alive _x): [_x] exec {delbody.sqs}" foreach _eunit

:you see the quotation mark's location is different to your
version.


Also you should probably add a time delay to your loop, so
that controll will be given back to the game.

;clearcorpse.sqs script
#loop
_eunit = list EVERYUNIT
"?(!alive _x):[_x] Exec {delbody.sqs} foreach _eunit"

~0.1

goto "loop"
exit


hope this helps then  :)

~S~ CD

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #5 on: 23 May 2003, 02:38:00 »
hmm

Well, wether there's a space between _x): and [_x]
i don't think this can be the reason - OFP doesn't care too
much about it in this case (it would be in case of description.ext
file or some other cases).

After having one more look at the condition inside the
script

Code: [Select]
"?(!alive _x): [_x] exec {delbody.sqs}" foreach _eunit

i thought that "?.... cannot be detected as a condition because
the question mark becomes part of the stuff inside the quotation marks.

?".... i could imagine the more to work here.

however i'll start up my game and have a quick look on this
one... back soon

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

B-2-0

  • Guest
Re:Errors with clearcorpse.sqs lag eliminator
« Reply #6 on: 25 May 2003, 05:34:17 »
Hmmm....I'm having the same problem....did u guys get this to work??