Aller au contenu

Photo

Add Item Script issue. Script is right, what it does is not. Need Help!


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

#1
DarkZenLord

DarkZenLord
  • Members
  • 16 messages
I have succesfully created and added several items in game. This is fine, however, the script uses a pretty basic logic to determine weather or not to add the item.    (If item is not in inventory - then add X)  Well this works great to get the item and use it, but what if you sell it? Store it? Destroy it? Well the script sees it's not in your inventory and gives you another. I do not want this to happen as it may encourage "cheating" (selling more or less). I also feel it takes away from what the item means.

Does anyone have additional scripting or scripts/ ideas on how to stop this?



-Thanks
-DarkZen

#2
J.O.G

J.O.G
  • Members
  • 355 messages
Create a new plot and check for a plot flag instead of the item.

#3
DarkZenLord

DarkZenLord
  • Members
  • 16 messages
I seen the plot flag script, I tried it and it actually highlighted "campaigns". I just want it to appear as DLC. Unless I did something wrong. Does the plot flag method highlight "Other Campaigns" mode?

#4
J.O.G

J.O.G
  • Members
  • 355 messages
Hm...

You go to the "Palette Window" and right click and select new->plot
You give your plot a name (e.g. MY_MODS_PLOT and a folder just like any other resource.

In the plot you create a flag and give it a name (e.g. DO_ONCE_ONLY)

In your script you then include wrappers.h and your plot's automatically created include:

#include "wrappers_h"
#include "plt_my_mods_plot"

void main()
{
     if (WR_GetPlotFlag(PLT_MY_MODS_PLOT, DO_ONCE_ONLY))
           return;

    (...Whatever...)

     WR_SetPlotFlag(PLT_MY_MODS_PLOT, DO_ONCE_ONLY,TRUE)
}

No campaigns involved.
   

Modifié par J.O.G, 09 décembre 2009 - 03:20 .


#5
DarkZenLord

DarkZenLord
  • Members
  • 16 messages
ah yes, a minor script error it seems. Got it working now. Thank you