Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Write a script that paints a gui file over the players view. Write the gui to be simple button controlled readable. Once the exit button is pressed, close gui and check off the final objective.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Yes, but how exactly do I proceed here.

 

1. The script shall first paint the screen with the gui (button controlled readable) DONE

 

2. When the last button is pressed, the GUI shall be removed (I've set it to be visibility o) DONE

 

3. The screen goes black and a cutscene shall play.

 

But here comes a little confusion. Shall I somehow call a new script with the cutscene here, from the gui? some sort of if-string that checks in the script IF the exit button has been pressed perhaps?

 

 

If I add the cutscene in the script, directly after I've drawn the gui, it won't wait for my clicking

 

 

ALSO

 

There is a cute little windows-hand when I hover over the buttons. Is this intentional or how do I kill the hand?

Edited by Fieldmedic
Link to comment
Share on other sites

But here comes a little confusion. Shall I somehow call a new script with the cutscene here, from the gui? some sort of if-string that checks in the script IF the exit button has been pressed perhaps?

 

I don't know, but I would suppose gui-script can sys.trigger something in the game. There are plenty of guis in D3 that trigger ingame doors and ladders and stuff. You need to find that command: when the exit button is pressed, start cutscene and close the gui.

 

 

 

 

There is a cute little windows-hand when I hover over the buttons. Is this intentional or how do I kill the hand?

 

So no darkmod mouse cursos seen in the menus, but the windows pointer seen in windows? Sounds like a nasty bug?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

There is a big clockpointer, but when I hover there is the hand...Well, minor bug, but I'll have to tend to that later <_<

 

Is the hand the standard DOOM 3 GUI interaction hand? Hopefully someone know how to make that stay the TDM cursor when it is moved over a button. I've a hunch that rich_is_bored may know.

 

I believe these may have something to do with this:

 

http://www.modwiki.n...GUI_item_events

 

Namely, onmouseenter and onMouseExit.

 

Is also suspect that looking at the mainmenu.gui provided with TDM may be of help.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

My mission is using the entity atdm:set_relations and when I DMAP I get a "warning file/tdm_team_relations.def 'editor_displayFolder' already defined". I guess this is a mere notification, nothing to worry about more than it states a change has been made in the relation matrix?

Link to comment
Share on other sites

Nothing to worry about I'm sure. I think this is an unusual entity that replaces the default and that line is in both defs. But if were not then I'm sure you wouldn't find the custom entity in the internal folder - it doesn't inherit it. I think it's just an oddity of how the code is set up.

Link to comment
Share on other sites

I'll ask a possibly dumb question:

 

Has anyone ever tried changing the player's team instead of changing the team relations?

 

Does this completely fail or have no effect?

 

:unsure:

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Better question:

 

Does "setEnemy" still work in TDM.

 

I see it in ai_events.cpp but "isEnemy" appears to be the TDM version?

 

const idEventDef AI_IsEnemy( "isEnemy", "E", 'd' );

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Better question:

 

Does "setEnemy" still work in TDM.

 

I see it in ai_events.cpp but "isEnemy" appears to be the TDM version?

 

const idEventDef AI_IsEnemy( "isEnemy", "E", 'd' );

 

setEnemy should be depreciated. Currently, the best script event should be setEntityRelation.

 

ai cityWatch_1 = $atdm_ai_citywatch_1; //need to declare an AI

cityWatch_1.setEntityRelation( $player1, -1 ); 
//1 = friend, 0 = neutral, -1 = enemy

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

Thanks MD!

 

I see that there is currently a tracker about "changing relations" so I was looking for a possible alternate route if that is not stable...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I see that there is currently a tracker about "changing relations" so I was looking for a possible alternate route if that is not stable...

 

setEntityRelation() was the method used in NHAT 2. It was a simple conditional, and that was its apodosis. (If the AI sees evidence, and that suspicious player is within his eyeshot, then setEntityRelation($player1, -1))

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

I must admit that I'm asking this partly to help Fieldmedic with his crash...

 

I think his idea would be easier to implement if the player could change teams from team zero (impossible?) but we'll see what he comes up with.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I looked at Fieldmedic's map script. There's nothing in it I see that should cause a crash-to-desktop. In fact, I have made it crash neither on my desktop nor on my laptop.

 

I could rewrite from scratch the way the whole mission does relations, but that might take me the entire day, and it wouldn't necessarily work the way he wants it to.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

It's good in some way that the game doesn't crash for some of you... :)

 

I'm now looking for a way to pause my epilogue script while the player is reading some text.

 

First there is a button controlled text and when the player presses the last button, the GUI shall go away and the script shall continue.

 

Just if I could get the hang of how to trigger things from the GUI, there is a ton of solutions, but now I only know how to make layers in the GUI visible/invisible.

 

I've checked in the mainmenu.gui and other guis from TDM but I can only see that buttons calls different console commands.

Link to comment
Share on other sites

Just if I could get the hang of how to trigger things from the GUI, there is a ton of solutions, but now I only know how to make layers in the GUI visible/invisible.

 

I don't know.. But googling gives these. Maybe they will help?

http://www.modwiki.net/wiki/OnTime_%28GUI_item_event%29

http://www.modwiki.net/wiki/OnEvent_%28GUI_item_event%29

http://www.modwiki.net/wiki/RunScript_%28GUI_command%29

http://www.modwiki.net/wiki/Activate_%28GUI_command%29

 

I think RunScript and Activate are the best candidates for success..

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hahaha, I actually found it before reading your answer :) Thanks anyway!

 

I didn't have a clear word for what to google for, but with some luck I found this

 

http://www.modwiki.net/wiki/GUI_commands

 

Damn, I feel like a thankless asshole asking all these questions :( But I have a vee bit of a panic for finishing the last steps of the mission...Only got tonight and some time on sunday evening to work...

Edited by Fieldmedic
Link to comment
Share on other sites

So I loaded up startmap.map to take a look at it, I click on the button that previews everything (lighting and textures) and it can render pretty slow even on this 4x2.5ghz 8GB x64 machine, like 500 ms on this tiny map. Can this be optimized somehow? I am running at a fairly large resolution... 1920x1080.

 

Bug: in this view, opening the file menu causes it to flash briefly and just close. BTW, these views don't have tooltips so I don't know what they are called (wireframe, shading, textures/...caulk, full?).

 

Req: "Open containing/viewed folder" equivalent button on open/import dialogs to open the folder in the filesystem (Win7 in my case). I thought GIMP had something like this in its GTK dialog boxes but I was wrong.

Edited by jaxa
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

      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 )
      · 2 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
       
      · 3 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...