I want to trigger a confrontation for the PCs based upon value of the one of the journal nodes. I thought I could construct a trigger that only fired if the node was a certain value. I probably don't enough about how triggers work to do this correctly. But the logicx would be:
If the quest node is = 200, then trigger custom encounter else do nothing..
If the PCs are victorious in the encounter and obtain a certain object change the quest node value to 210 or some other higher number.
I am use to using gc_journal_node in converstaions, but I quess I would have to actually write a script for this one and I not sure exactly how. Any help would be appreciated.
Can you fire a trigger based on a journal node value
Débuté par
JonnieR
, sept. 28 2010 03:20
#1
Posté 28 septembre 2010 - 03:20
#2
Guest_ElfinMad_*
Posté 28 septembre 2010 - 07:31
Guest_ElfinMad_*
The best thing to do would be to check out a scripting tutorial. _Knightmare_ did one that is on the vault and I think Jassper's website, noobs corner, explains the concepts well.
To start you off, your script would be something like this. Note that this is incomplete and text preceded by "//" are comments.
void main()
{
//get the object that enters the trigger
object oPC = GetEnteringObject();
//if the object is not the player then script should not run
if(!GetIsPC(oPC)) return;
//check the journal entry and do stuff if journal entry is correct
//assuming correct value is 200
if(GetJournalEntry("JOURNAL_TAG", oPC) == 200)
{
//Code that does stuff goes here
}
}
To start you off, your script would be something like this. Note that this is incomplete and text preceded by "//" are comments.
void main()
{
//get the object that enters the trigger
object oPC = GetEnteringObject();
//if the object is not the player then script should not run
if(!GetIsPC(oPC)) return;
//check the journal entry and do stuff if journal entry is correct
//assuming correct value is 200
if(GetJournalEntry("JOURNAL_TAG", oPC) == 200)
{
//Code that does stuff goes here
}
}
#3
Posté 28 septembre 2010 - 09:11
#4
Posté 28 septembre 2010 - 10:07
Changing a journal entry does not fire an event. Whatever event sets the journal node to 200 would have to also fire your event.
If you want the event to occur sometime after the urinal node was set to 200 then you probably need to decide when you want it to occur and then use an on enter script or heartbeat script to check for the journal entry value and fire the event.
Regards
If you want the event to occur sometime after the urinal node was set to 200 then you probably need to decide when you want it to occur and then use an on enter script or heartbeat script to check for the journal entry value and fire the event.
Regards
#5
Posté 28 septembre 2010 - 10:09
Sorry, urinal should be journal. I'd edit it, but editing doesn't work on iDevices.
Didn't mean to have a potty mouth.
Regards
Didn't mean to have a potty mouth.
Regards
#6
Posté 29 septembre 2010 - 10:06
Thanks for all the help. I basically took Elfinmad's script example and modified it and it works great.





Retour en haut






