oTarget Mystery
Zephirius
Member Posts: 419
I cant get oTarget to set to destroy?
0
Comments
It would help if I knew what type of object 'RUMOR_01' is in the game.
Sorry I didn't try to compile this. The main thing that comes to mind is if 'RUMOR_01' is a creature, it might be set to be undestroyable.
Yeah, that worked. Thanks.
Are you up for another challenge?
Let me preface this by saying that I struggle mightily with conceptual ideas such as local variables. It's not that I haven't tried, but I've been trying for the last five days unsuccessfully.
I just want to know how to go about not playing the same conversation twice, especially when doing a "fetch" and "retrieve". The only thing I understand as of now is that I have to make 2 conversation files. As far as the Get and Set local variables - well, I get them confused. I guess what I'm asking is, HOW, WHEN and WHERE they should go?
Once I understand this concept, I think it would break the dam wide open for me - so to speak.
Any help would be awesome...
Scenario 1:
The portion of the conversation should only ever happen once.
In the conversation file, make two main branches from the root:
1. "Hey there, stranger."
2. "Hello again, hero."
This has all the parts of the WHERE, WHEN and HOW, for looking at a local variables.
In the 'Text appears when…' tab for option 1, make a script that checks to see if option 1 has been seen before. By default, the variable 'notMet' will be FALSE. If you check any random undefined variable (of type int[eger]), it will come back as 0, witch the game recognizes as FALSE. So that is why we have the not symbol (!). Because not FALSE is TRUE. This way the default value will return TRUE, and conversation option 1 will be displayed to the player.
Next, make sure that option 2 does not show at first.
Put: in the 'Text appears when…' tab for option
3. This script is the same but without the not symbol (!). So by default, this script will return FALSE, and the option will not be displayed to the player.
Next we need to mark that option 1 has happened.
In the 'Actions Taken' tab of option 1, make a script that includes this: When this script is ran, it will find OBJECT_SELF, witch is the object the player is talking to, and assign the value 1 to the integer variable named 'notMet'. After the first time any player talks to the object, only option 2 will ever show.
Scenario 2:
The portion of the conversation should happen once per player.
This scenario is the same, but the name of the variable needs to be unique.
So this time, the script in option 1 under tab 'Text appears when…', will need to be more involved: And the script in the 'Actions Taken' tab will look like: This approach has flaws, but the concept works (Provided no one names their character the exact same thing).
In this scenario, let's say my character's name is John, and the NPC he is talking to is Mike. The object Mike, has no local variable 'John'. By default it will return FALSE, but that first script is returning the opposite of whatever it finds for the variable named 'John'.
After the conversation happens, the object Mike gains a local variable named John with a value of 1. Now when any player named John talks to Mike, the conversation option 1 will not show.
If you still can't follow the logic in these, I can explain it a level down. There's just a lot more steps. The logic is easier though.
Now "Rumor" can finally get the medicine he needs. Rumor is a male leopard "henchcat" that you heal and befriend.
I can't thank you enough. You truly are an awesome teacher. Gotta go. Building a few Chult maps - that's were you pick Rumor up at...