Home   Help Search Login Register  

Author Topic: lag?  (Read 780 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
lag?
« on: 08 Feb 2005, 15:33:32 »
i think this goes here anyway. can lag be caused by scripts not having exit on the end? and is there anyways of getting rid of lag without deleting anything in game?

Offline 456820

  • Contributing Member
  • **
Re:lag?
« Reply #1 on: 08 Feb 2005, 15:36:08 »
and also does any one have a script wich deletes dead bodies after a set amount of time?

GI-YO

  • Guest
Re:lag?
« Reply #2 on: 08 Feb 2005, 15:54:06 »
Macguba made a handy 'lag buster' tute in the ed department, im sure that will give you all the info you need to know.

GI-YO
« Last Edit: 08 Feb 2005, 15:54:21 by GI-YO »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:lag?
« Reply #3 on: 08 Feb 2005, 16:19:40 »
There are also dead body deletion scripts in the Ed Depot.  

I don't know about scripts with no "exit" though.    If there were a lot of them, and depending on how the game handles them, then I suppose it could cause lag problems.   But then if there were a lot of unexited scripts around lag might be the least of your worries.     Or perhaps the game just exits a script automatically when it can't find any more commands.

The best way to deal with lag of course is to buy a much better computer.  ;D

Oh, and if you think of something after you've posted, you can modify your own posts - just click the button in the top right hand corner.     Helps make the thread easier to read too.  :)
Plenty of reviewed ArmA missions for you to play

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:lag?
« Reply #4 on: 08 Feb 2005, 16:31:09 »

I thought it was obvious that a script dies completely if there's no more lines left.

I can't even imagine a reason why the game would keep a script file in memory or process it somehow, if there's nothing to read.

If it happens it's a programming error.

Acecool

  • Guest
Re:lag?
« Reply #5 on: 08 Feb 2005, 16:42:07 »
Why would it be a programming error if it does what its told...

If it is not told to exit through the front door "Exit" then it stays...

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:lag?
« Reply #6 on: 08 Feb 2005, 16:55:48 »
Please read this again:

Quote
can lag be caused by scripts not having exit on the end?

Well...

It would certainly be a programming error if a script file is kept in memory or processed somehow after the script has reached the end of file.

A script has to have an endless loop if it continues running, or am I completely wrong? Tell me what exactly does the game do with a script file after it is read to the end?
« Last Edit: 08 Feb 2005, 16:56:50 by Baddo »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:lag?
« Reply #7 on: 08 Feb 2005, 17:41:47 »
I don't know.    Though I'm sure somebody does and I hope they tell us.

But my point is that it doesn't matter in this particular case.   If you have one script on an endless non-exit loop that's not enough to cause lag.   If you have loads of such scripts your mission is fucked up anyway.
« Last Edit: 08 Feb 2005, 17:42:52 by macguba »
Plenty of reviewed ArmA missions for you to play

CopyrightPhilly

  • Guest
Re:lag?
« Reply #8 on: 08 Feb 2005, 17:43:45 »
only use loops if you need to, from what i know exitign a script will be very usfull in reducing lag if your mission has many scripts.

but loops, always make sure you have a delay in it somthing like ~0.5, this will stop "system lag" being as bad.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:lag?
« Reply #9 on: 08 Feb 2005, 17:52:47 »
Magcuba, I am pretty sure all scripts that do not have an endless loop are exited automaticly at the end of the file and do not exist after that. Or let's say, the game does not keep the memory address where the script was in the memory and releases that part of memory to other use.

Functions are different as far as I have read from a great tutorial somewhere here...
« Last Edit: 08 Feb 2005, 17:53:55 by Baddo »

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:lag?
« Reply #10 on: 08 Feb 2005, 19:35:43 »
Here's a thing, just put "exit" at the end of your script anyway. Its good practice, like ending stuff in html. If a mission maker has used a script without one and the mission works fine then what's the problem? If you are writing the script, then you should end it with "exit" anyway.
« Last Edit: 08 Feb 2005, 19:36:33 by The-Architect »
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:lag?
« Reply #11 on: 08 Feb 2005, 22:18:15 »
In my experience, and logically, when a script runs out of lines to process it will exit.

It will exit whether 'exit' is present or not.

Exit is nice and tidy, but not strictly essential.


Planck
I know a little about a lot, and a lot about a little.