Jump to content
The Dark Mod Forums

Triggering objectives with a readable?


Blaster

Recommended Posts

Hi,

 

I'm currently working on a level but I'm stuck using the objective editor. Basically the player finds a scroll telling him to check a neighbours place for more information.

 

The problem I'm having is that when the player picks up the scroll the objective completes but to make a new objective appear and become visible to check out the neighbours place I can't trigger it by picking up the scroll.

 

So the player is just picking up a scroll to set visible the new objective so it would look like this:

 

1. Check the scroll by your door. COMPLETED AFTER PICKING IT UP.

2. Check out the neighbours place. NOW VISIBLE AFTER GETTING THE SCROLL.

 

Another thought is, is there anyway to make the first objective complete AFTER the player opens the scroll for viewing rather then when he has just picked it up? Any help would be appreciated.

 

By the way this Mod is excellent! I love the Thief series and you guys have really captured it. Keep up the great work!

Link to comment
Share on other sites

The problem I'm having is that when the player picks up the scroll the objective completes but to make a new objective appear and become visible to check out the neighbours place I can't trigger it by picking up the scroll.

Picking up the scroll completes your objective, so you can add an entity to the "completion target" entry field. This entity will be triggered when the objective is done, i.e. the scroll is picked up. You can use something like tdm_target_setobjectivestate as target entity to enable a previously hidden objective.

 

Another thought is, is there anyway to make the first objective complete AFTER the player opens the scroll for viewing rather then when he has just picked it up? Any help would be appreciated.

This is something which doesn't work yet, but it has been asked for in the past (multiple times), so it might end up being available when TDM goes live.

Link to comment
Share on other sites

Ok I'm doing a test level with the same scenario. For the objective I've added under 'completion target' the name of the tdm_target_setobjectivestate entity which is called 'getscroll'. After exiting the objective editor and then going back into it the entry has disappeared and keeps doing. What am I doing wrong? Here is my objective:

 

image1.JPG

 

Here the player is picking up a book that should trigger a new objective to pickup a scroll. The pickup scroll objective is the hidden one.

Link to comment
Share on other sites

Ok I'm doing a test level with the same scenario. For the objective I've added under 'completion target' the name of the tdm_target_setobjectivestate entity which is called 'getscroll'. After exiting the objective editor and then going back into it the entry has disappeared and keeps doing. What am I doing wrong? Here is my objective:

 

Here the player is picking up a book that should trigger a new objective to pickup a scroll. The pickup scroll objective is the hidden one.

There's a chance you're running into a DarkRadiant bug - can somebody try to reproduce this error and/or file an issue report on the tracker at http://bugs.angua.at?

 

As a workaround you can try adding the spawnarg to the objectives entity yourself:

"objN_target_complete" "getscroll"

Where N is the number of your objective, 1 in your case.

Link to comment
Share on other sites

I've tried adding the spawnarg myself to the 'target_tdm_addobjectives_1' entity but when I go into the game and pickup the book the game crashes to the main menu and in the console it says:

 

ERROR: idEvent::CopyArgs : Wrong number of args for 'activate' event.

Well, chances are that this feature hasn't been tested thoroughly... I'll file an internal issue report about this.

Link to comment
Share on other sites

This has already been tracked

 

http://bugs.angua.at/view.php?id=1126

 

just hasn't been "gotten around to" yet.

|=-=------=-=|

happycheeze.deviantart.com

 

Moddb

 

Gamers Outreach, a nonprofit that uses videogames to raise money for chairty.

|=-=------=-=|

Link to comment
Share on other sites

There is a way to work around that complete objective on reading not on frobbing if you feel adventurous. It should work but I've not tried it. We can give more details on each of the following stages if you want it (and I hope I've not missed anything!)

  1. Optionally create a trigger_once with a wait to delay the completion for a few seconds after reading
  2. Optionally create a trigger_once with a wait to delay the new objective appearing for a few seconds (so you don't get 'objective complete' and 'new objective' messages competing and confusing.)
  3. Set up the 'read scroll' objective as a custom objective instead of an 'acquire'.
  4. Create a target_tdm_setobjectivestate set to complete the custom objective when triggered.
  5. Create a target_tdm_setobjective_visibility set to make visible the new objective when triggered.
  6. Add to the scroll these key/value pairs:
    • scriptobject InvTriggerScript
    • target <delay trigger1>
    • target2 <delay trigger2>

[*]To delay trigger1 add target <target_tdm_setobjectivestate entity>

[*]To delay trigger2 add target <target_tdm_setobjective_visibility> (give it a longer wait delay too)

[*]Create a plain text file yourmapname.script and put it in the folder with your map.

[*]Paste into it...

//General purpose script object to trigger the targets of an object in the inventory.

#include "script/tdm_events.script"

object InvTriggerScript
{
void inventoryUse(entity userEntity, entity frobbedEntity, float buttonState);
};

void InvTriggerScript::inventoryUse(entity userEntity, entity frobbedEntity, float buttonState)
{
activateTargets(userEntity);
}

Note that this script will eventually be included in a future Dark Mod release so will probably conflict. At which point you should delete this script file and the scriptobject should still work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 4 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...