Home   Help Search Login Register  

Author Topic: Preload  (Read 1080 times)

0 Members and 1 Guest are viewing this topic.

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
Preload
« on: 11 Sep 2007, 01:13:12 »
I need some help with preloading cameras, i have set the positions, but im wondering whether or not the camera is actually looking at anything, or just in a position, this is my preload.sqs

Code: [Select]
preloadcamera [11779.62,5312.31,19.14]
preloadcamera [12194.23,6594.36,0.89]
preloadcamera [12953.00,7542.07,0.82]
preloadcamera [12215.34,7136.90,25.66]
preloadcamera [11931.85,7345.45,0.38]
preloadcamera [11883.92,7394.38,1.21]
preloadcamera [12051.93,7420.33,2.00]

exit

these are the preload positions when a new area is being looked at. you can see the flaws in textures.  Theres nine main areas the camera looks to and pretty much none of them are good enough... see for yourself with the link at the arma general discussion: http://www.ofpec.com/forum/index.php?topic=30238.0

please help me fix this, thank you

surdus
Campaigns are hard, I'll stick with scripting for now!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Preload
« Reply #1 on: 11 Sep 2007, 01:35:40 »
preloadcamera precatches an area around the indicated position for immediate usage by real active camera. The preloading might take more or less time and more or less memory depending on detail level, vcard ram, etc. So, just after executing that command the area is not preloaded, you still need to wait a bit.

for SQS
@!preloadCamera _pos

for SQF
waitUntil preloadCamera _pos

If you execute several preload operation one after another, more than probably you will run out of cache memory quite fast, so after your last preload command, more than probably the cache of first preload has been already lost.

If you have a cutscene, preload first the area of that cutscene, and while the cutscene is running, preload the area of the next one and so on.

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
Re: Preload
« Reply #2 on: 11 Sep 2007, 03:19:55 »
i had a feeling that was the problem, to many preloaded at once...

so if i give a ~15 or so between each major preload it will preload it as it goes along?

i'll have to give this a try
Campaigns are hard, I'll stick with scripting for now!

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Preload
« Reply #3 on: 11 Sep 2007, 17:30:50 »
afaik preloadCamera will return when its done, there's a command to check which can be used as "wait" condition.

Look here


Myke out