Home   Help Search Login Register  

Author Topic: Max # of scripts in a mission  (Read 4504 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Max # of scripts in a mission
« Reply #15 on: 19 Nov 2002, 13:57:23 »
Quote
(This information may not be totally factual, it all comes down to the way that BIS programmed flashpoint. If their coding is logical opposed to shabby, the above statements will be correct)

errm dreaming_adam,

a few posts above, i've posted 2 links, where the first link
leads to the official BIS forum. If you click on the link, you
will find yourself in a thread, where the BIS lead programmer
already gave an answer on that.


However, since not that lot of ppl, than i thought, are following links, i'll copy/paste something into here.
But if you want to know the whole story, you still have
to click on the first link of my first reply to this thread above.

my question:
Code: [Select]
If there really would get someone to read this thread
(i mean someone who knows ) could we maybe also
get compared, what eats more cpu power:?

Triggers (e.g: waiting for boolean, numeric variable, unit-status, syncronized with anything, checking an area,
placeholder triggers (to use their trigger_list by trigger-name,
etc.)

to

@conditions_in_scripts

AND

#loops
in_scripts
~000001
goto "loops"

 

I've neaver seen written black on white, that script conditions/loops are faster/slower than triggers,
only rumours, and even those move into different
directions. Some say trigger's, others are saying scripts
are faster.

Suma sayz:

Code: [Select]
Quote (DV Chris Death @ Oct. 11 2002,20:17)
Triggers (e.g: waiting for boolean, numeric variable, unit-status, syncronized with anything, checking an area,
placeholder triggers (to use their trigger_list by trigger-name,
etc.)

to

@conditions_in_scripts

Trigger are evaluated approximatelly twice per second, therefore they are less CPU intensive than script conditions. Trigger with condition condition used almost the same CPU power as script

~0.5
@condition

Triggers associated with area may require more a little bit more CPU power, as vehicles need to be checked to see if they are entering/leaving the are. The perfomance hit should not be significant though. If you want to know exact numbers, some measurements would be necessary.

Code: [Select]
Quote (DV Chris Death @ Oct. 11 2002,20:17)
@conditions_in_scripts

AND

#loops
in_scripts
~0.00001  // <- quote fixed added decimal point
goto "loops"

Those two are almost identical. ~0.0001 will get executed once per frame (unless your fps is higher than 10000).

~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

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Max # of scripts in a mission
« Reply #16 on: 20 Nov 2002, 22:22:58 »
e.g: If you create a trigger with size: 50/50, activated by
west/present
condition: this
or condition: this AND (anything else)
You can always access the trigger's list by using the option:

list triggername

If you use exactly the same trigger without a "this" in the
condition field, you can't access the trigger's list anymore.
I've been working with such triggers lately, so i can ensure
this result for sure.

This result makes me think, that the trigger area will not be
checked, if the condition is not requiring to check it (true,
anything (not alive), "_x blabla" count (units groupx), etc.).

Hope this makes sense to someone else too  :D

~S~ CD

Hmm, I"m not 100% sure I believe that.  I have a mission where I have a trigger that checks for the presence of East within a 200m radius.  In the condition field, I have the following code:

count list trigger1 < 2

The idea is that if there are less than 2 East soldiers remaining in the area, the trigger activates.  I do not have this in the condition field, but yet the trigger seems to work properly.

Admittedly, I haven't gone around counting every last body to make sure there really were less than 2 East soldiers left, but it works as far as I can tell.

I'll have to go double check my code to make sure that I indeed don't have this in there, but I'm pretty sure I don't.
Ranger

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Max # of scripts in a mission
« Reply #17 on: 21 Nov 2002, 01:02:31 »
"count list trigger1 < 2" is the same type of thing as putting "this", therefore, the question still remains: Does the trigger access it's list only when it is queried, or is it's list maintained regardless of the condition?

A test might be to create a tigger and set it to "west present", and set it's condition to "false".

Put a west unit in the triiger and then create another trigger that lists the first trigger.

But then, that still wouldn't really answer the question. The second trigger querying the first and getting an answer wouldnt neccessarily mean that the list is being maintained/updated at all times by the first trigger, just that the list is allways accessable regarless of the trigger's condition.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Max # of scripts in a mission
« Reply #18 on: 21 Nov 2002, 12:58:01 »
 :-[ - OK, my fault on this one here

I've been checking this again, and figured out, i've
done it in a bit different way, than i wrote above.

When i made my e.g: west/present trigger, i've created
2 arrays from the activation field of this trigger. And when
i was disabling the trigger's condition, instead of using
"this", the two arrays did never exist. So my other triggers
in this tist couldn't work.

I've been testing that again now:

west/present
name: triggerA

condition: false    : i've also tried some other conditions,
just to make sure

and a radio-alpha trigger, displaying me the list of triggerA

Whatever the condition was, the list was displayed.
So sorry for the wrong info above - me couldn't remember
correctly in that case  ???

I've tried moving units in and out the trigger area, and it seems that the trigger list also gets updated every time
it should.

~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

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Max # of scripts in a mission
« Reply #19 on: 21 Nov 2002, 21:02:12 »
"count list trigger1 < 2" is the same type of thing as putting "this", therefore, the question still remains: Does the trigger access it's list only when it is queried, or is it's list maintained regardless of the condition?

Those are not the same thing.

"count list trigger1 < 2" checks to see if there is 0 or 1 East unit in the area.

When using "this", I had the trigger checking if East units were not present (despite what my previous message said).  Thus, it would not activate until there were 0 East units remaining in the area.

They are very different in their uses.  I used "count list trigger1 < 2" for my trigger since what often happened was the last East unit would hide in some bushes somewhere and wait there until the end of time.  Since my mission did not continue until all east units were cleared, it would always take 20 to 30 minutes just to clear out one town.

Thus, by using the "count list trigger1 < 2" condition, if that last guy was indeed hiding out in the bushes where no player could reasonably find him, then the condition would be met anyway and the mission could go on.
Ranger

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Max # of scripts in a mission
« Reply #20 on: 21 Nov 2002, 23:36:19 »
What I meant is, that they are the same type of thing - they both are conditions which depend on the trigger's contents.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Max # of scripts in a mission
« Reply #21 on: 22 Nov 2002, 00:28:06 »
What I meant is, that they are the same type of thing - they both are conditions which depend on the trigger's contents.

Oops.  That's what happens when I don't read too carefully.  :P

Anyway, as Chris Death clarified, the list is constantly updated even if you don't use this in the condition field.  At least, that's what I think he's saying.

It must be, otherwise my trigger wouldn't work.
Ranger

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Max # of scripts in a mission
« Reply #22 on: 22 Nov 2002, 14:19:42 »
Yeah, that's right, i've also tried that with conditions,
which had really nothing to do with the trigger, and
the list still was updated everytime.

~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