Aller au contenu

Photo

Ensure a resource exists/isvalid before you load it.


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
JackFuzz

JackFuzz
  • Members
  • 408 messages
How do you ensure a resource exists and is valid before you load it?

In my case I want to make sure that a cutscene resource exists and is valid before I load it.

Modifié par JackFuzz, 29 janvier 2010 - 11:55 .


#2
Bibdy

Bibdy
  • Members
  • 1 455 messages
Not really sure how you'd check that, but errm, question is, why wouldn't it exist/be valid? If its bundled with your own mod in dazip form, I don't think there's a danger of it not existing, and if it doesn't exist it would probably just not load it. The game engine seems to be designed with those kinds of failsafes.

#3
JackFuzz

JackFuzz
  • Members
  • 408 messages

Bibdy wrote...

Not really sure how you'd check that, but errm, question is, why wouldn't it exist/be valid? If its bundled with your own mod in dazip form, I don't think there's a danger of it not existing, and if it doesn't exist it would probably just not load it. The game engine seems to be designed with those kinds of failsafes.


If my mod is installed with a few others, I want to check to see if their resources are available and ready to use.

#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
You could try using GetPRCEnabled.

#5
JackFuzz

JackFuzz
  • Members
  • 408 messages

Craig Graff wrote...

You could try using GetPRCEnabled.


Unfortunately the person did not release their mod in a package like this to be identified.

HOWEVER, this is still a very valuable command!

GetPRCEnabled will help me a lot in the future!