Aller au contenu

Photo

New item and equip script


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

#1
milank

milank
  • Members
  • 4 messages
 Hi,

i would like to do such small quest: Hero should take an item from container and equip it.
1/ how to make a script to change the plot flag when the item is equiped
2/ how to insert own item to container inventory

#2
Halchek

Halchek
  • Members
  • 36 messages
Hi milank,



To change plot script try WR_SetPlotFlag(PLT_PGH_DEMO_CLEARTHEHUT, QUEST_ACCEPTED, TRUE);



To take an item from the container and add it to your inventory use UT_AddItemToInventory(R"pgh_demo_hutkey.uti");.

#3
milank

milank
  • Members
  • 4 messages
Thanks

1/ can you write the whole script with all the include, void etc.?


#4
Halchek

Halchek
  • Members
  • 36 messages
#include "wrappers_h"
#include "plt_pgh_demo_clearthehut"

//set various flags on accepting the clear my hut quest
void main()
{
WR_SetPlotFlag(PLT_PGH_DEMO_CLAERTHEHUT, QUEST_ACCEPTED, TRUE);
}
I guess plt_pgh_demo_clearthehut is the critical none obvious item in this example.  It is basically the name of plot prefixed with "plt_".  for example:-  #include "plt_myquest".
 
Regards

Paul

Modifié par Halchek, 12 décembre 2009 - 04:25 .


#5
milank

milank
  • Members
  • 4 messages
ok, this set the plot flag, now how to handle an event

i would like to set the flag true, when specific item is equiped