Jump to content
The Dark Mod Forums

ACK - simple guiscript question


anartist

Recommended Posts

Hello
I have Dhewm working very well with a very small starter pack that I can build on.
I have quake 4 installed because I can't get a gui editor to work in the 10 other executeables I have.
in main menu gui
I want to start a map called 1
if I fire up the dhewm exec and console map 1
fine
runs
want to fire map 1 from a button
that's it.
can't get syntax correct perhaps
starts up to load map flickers
the gui "cmd" syntax is possibly wrong but I can't find any examples of it other than this style
 
I know it's something simple
like I have to program a wait or the syntax is off
this one thing will enable me to package the set properly for ppl
Idon't understand fully the script code
I get that its calling a command to the engine from the script
I'm a designer I have lightwave environments
blender md5's
I need to trigger the start map from the beginning sequence or a gui
thank you if you have a moment to help
I'm using not the latest as it screws up for me but one back, the 32 bit one even though I am on x64.
Its great and looks good, I have darkradiant, I have zbrush, I can build materials
but I can't trigger a starting map from the script.
=|
-----------------
windowDef Desktop
{
rect 0,0,640,480
windowDef unnamed2

{
rect 0,0,640,480
visible 1
background ""
backcolor 0.501,0.250,0,0.552
matcolor 1,1,1,1
}
windowDef unnamed
{
rect 486,30,100,100
visible 1
forecolor 1,1,1,1
text "acl"
textscale 1
}
windowDef unnamed1
{
rect 488,151,100,100
visible 1
forecolor 1,1,1,1
text "skl"
textscale 1
onActivate{set "cmd" "startgame 1";}
      }

}


--------------------------------

--
.............
Christopher Taylor
Please use email to contact me
christopher.don.taylor@gmail.com

blog:
http://christuusgnosis.wordpress.com
http://christuusgnosis.blogspot.com
http://serializednovel.wordpress.com

"All that is valuable in human society depends upon the opportunity for
development accorded the individual."
-A. Einstein
Link to comment
Share on other sites

First quake 4 gui scripting has some important diferences from Dhewm 3 gui scripting, the later is based on original Doom 3 system, so don't be surprised if Quake 4 gui tutorials don't work. For example, in quake 4 you can call onNamedEvents directly in the gui using comand "namedEvent", wheres on doom 3 gui's you can't, only through c++ (but is not hard to change the gui source code for that to happen I did it, will post the c++ code if someone wants), but that is not the only diference, for example in quake 4 you can access individual values from a vector, using the same way you do in doom script, using suffix _x _y _z , you cannot do that in original Doom 3 gui scripting, at lest I tried it and it caused a gui error. Another thing only exclusive to Quake 4 gui scripting, is that you can transition floats, wheres Doom 3 you can only to that to vectors.

About your gui code, afaik the command OnActivate is a global command, meaning it should be put exclusively inside the main desktop window, like the OnNamedEvent's, not any other window children, if you want a child window to start a commd use, OnEnter (when the user presses enter key), OnAction (when the user clicks the action key, mouse 1 normaly) or OnMouseEnter when the player mouses over the child window, I may be forgetting something but afaik that's the gist of it. 

 

ps: You can also use onTime events, to start a map automatically that is how Doom 3 main menu does it. 

 

for example: 

onTime 12000  // after 12 seconds
        {
            set "cmd" "startgame test.map";
        }

Edited by HMart
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.
      · 5 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...