Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

p.s. Tip for debugging scripts: console command "com_noprint 0" will let you see console messages without having to open the console. It'll print 3 lines of console text at the top of your screen while playing, so you can see the output of your "sys.println()" messages easily. "com_noprint 1" will turn it off again.

Link to comment
Share on other sites

Too bad, I was hesitating between the two of them, since I didn't understand why it was talking about an "other" AI x)

 

I'm having a small problem right now... I'm trying to explain to the player how to pick a lock with popup messages. The problem is that this is quite long to explain, and my messages can't hold more than six lines.

Therefore, I tried to trigger two different messages :

 

- The first has a "show" of 7 seconds, and a "wait" of 14000 milliseconds.

- The second one as a "delay" of 7 seconds, a "show" of 7 seconds, and a "wait" of 14000 milliseconds

- Both of them are targeted by a trigger_multiple. The first is on "target0", and the second is on "target1".

 

I thought that, by doing so, I could get the two messages to appear one after the other, and to repeat themselves. The "delay" and the "show" seem to work fine, but they don't seem to follow my "wait" instructions, and they keep appearing on top of each other after one or two seconds.

Edited by Deshtat
Link to comment
Share on other sites

Why not triggering them after each other by using a trigger_relay?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

The trigger multi will always trigger all its targets at the same time. So you need a separate trigger for each message.

 

I think the right setup is: trigger_multi targets msg1 AND trigger_relay. triger_relay has a delay and targets msg2.

Link to comment
Share on other sites

Yep, that's what I've meant :)

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Well, I just tried this, but it doesn't seem to work either. Oh well, I'll check this later ^^ Thanks guys!

 

I have another issue though : there is a moment when the player has to knock a guard unconscious. If the player fails by alerting the guard (for instance, if he hits his back instead of his head), he gets teleported back, and the guard gets back to his first position with an alert lvl of 0.

 

The problem is the following : even if the guard's alert lvl is set to 0 again, he still "remembers" being alerted at some point, and he keeps his weapon out. In this state, he can't be knocked out.

 

Is there a way to prevent him from remembering previous alerts? Or at least, to make him act natural again?

Edited by Deshtat
Link to comment
Share on other sites

I think I would like him to forget everything, just like he was at his appearance in the map. Maybe it would solve the problem, because it seems that, once he spotted the player once, he cannot be knocked out.

 

But, yeah, if he could sheath his blade as well, that would be nice too.

 

It wasn't really a problem before, because the player had no way to alert the guards past lvl 1 or 2 before they were reset, but in this case he can set his alert lvl from 4 to 5 in a single mistake.

Edited by Deshtat
Link to comment
Share on other sites

IMHO, just removing the AI and respawning an identical one (giving it the same name etc via the respawn script) is going to be the cleanest way to do what you're going for. Otherwise you're likely to run into all kinds of strange circumstances that will disrupt what you're trying to do.

 

If you check out the map script for Lich Queens Demise it has a very good example of setting up this kind of respawning.

Edited by Moonbo

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Well it was still a little complicated for me to understand, but I found another way to solve the problem ^^ I gave the AI the spawnarg "draws_weapon 0", this way he never actually draws it. Apparently, having a weapon in its hands prevents an AI from being knocked out, whatever the alert level.

Link to comment
Share on other sites

void emptyHand(string hand) maybe.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I have a short question, that might already have been asked here (but 226 pages with over 5600 posts is too much for me to look through and a quick search did not help): How can I display a message in the game. Just as a comment for the player (e.g. "You are now in pagan territory" or something like that). I did not find it in the script event list, but maybe I just overlooked it. And another thing: How can I make in-game menus for decisions (e.g. "Which direction do you want to push the lever?" with the options "left" and "right")? Thanks in advance for any help given!

Edited by Destined
Link to comment
Share on other sites

In game messages can be done via atdm:gui_message. You can find it under targets.

 

The latter is a bit more difficult and requires scripting. Some buttons (including the movement ones) can be retrieved via $player1.getButtons(). You'll have to check which number corresponds to which button.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Hay, Obbs & Geyman,

 

Easy on the information right?

 

I can't help but think some one here is not sharing their knowledge with the forum.

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

What do you mean, exactly?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I'm using a script to repeatedly spawn and then remove a torchlight (just the light entity, not a full torch). The problem I'm running into is that when I remove the light entity the torch burning sound still plays (so maybe the bound speaker isn't being removed?). Because this particular script is running in a loop, this results in a new crackling fire sound every time I spawn/remove a light which soon makes my map sound like a raging inferno. I guess my questions are:

 

1) Is this a bug? Is there any way to get rid of the torch sound when removing the torch light entity?

 

2) A workaround that I found is to extinguish the torch, wait a second, and then remove it. I'd rather not do this because it diminishes the effect I'm trying to go for, and I'm also worried that even though the sound is gone the sound entity hasn't been removed and that with enough time I'm going to end up spawning tons of speaker entities without my knowing it. Is there any way for me to be sure that I'm not creating "garbage" entities with this script (like a console command listing the number of entities in a map)?

Edited by Moonbo

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 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
×
×
  • Create New...