Aller au contenu

Photo

How to add a CampaignInt variable for the object GetModule()?


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

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

Is wrong add campaignInt to object module? 

 

Example:

 

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



#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

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);
}



#3
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

OK GhostOfGod. Thank you.