Aller au contenu

Photo

Typecasting String Variable to Resource


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

#1
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
heyas;

  i'm trying to create a generic cutscene running script.  and i THOUGHT it would be simplest just to name the trigger/lever the same as the cutscene (ie "whatever.cut"), then have the script get the name and run it.  wellll... i just don't know how to typecast a string variable to a resource?

because the standard cutscene line is like this:

CS_LoadCutscene(R"whatever.cut");

but when i do

string sCS = GetName(OBJECT_SELF);

...well, the cCS doesn't go inside quote marks, and the function wants a resource, not a string... and i found ResourceToString, but no StringToResource, so i'm sitting here going.... AAAAAAAAAAARGH!

CS_LoadCutscene(R sCS);   doesnt know what the dip i'm talking about
CS_LoadCutscene(R(sCS));  doesn't know what R is
CS_LoadCutscene(®sCS);  doesn't know what R is

  is there a lexicon anywhere?  pressing f1 on the functions doesn't help, sez it cant load the script help file. :/  meh.

#2
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

i just don't know how to typecast a string variable to a resource?


http://social.biowar...1/index/2859022
http://social.biowar.../8/index/248412

is there a lexicon anywhere?  pressing f1 on the functions doesn't help, sez it cant load the script help file. :/  meh.


http://dalexicon.net...title=Main_Page

Modifié par _L_o_B_o_, 05 septembre 2010 - 04:35 .


#3
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
thanks a bunch lobo!