Author Topic: How to add a CampaignInt variable for the object GetModule()?  (Read 383 times)

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               

Is wrong add campaignInt to object module? 


 


Example:


 


SetCampaignInt("mycampaign","myvariable",10,GetModule());



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
How to add a CampaignInt variable for the object GetModule()?
« Reply #1 on: July 19, 2015, 08:19:08 pm »


               

I don't believe so. The last parameter is for player information specifically. If you just want to store an int variable that pertains to a specific module then you'd just do something like:


 


void main()

{

    string sMod = GetName(GetModule());


    SetCampaignInt(sMod, "awesomelevel", 100);

}


 


But if you want to store an int variable about a specific character in a specific module then you'd do something like:


 


void main()

{

    string sMod = GetName(GetModule());

    object oPC = GetLastUsedBy();


    SetCampaignInt(sMod, "awesomelevel", 50, oPC);

}



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to add a CampaignInt variable for the object GetModule()?
« Reply #2 on: July 19, 2015, 09:08:09 pm »


               

OK GhostOfGod. Thank you.