Page 2 of 2

Posted: Mon Nov 21, 2005 4:56 pm
by wacko
Elgan wrote:u cud manipulate the widgest to just a line of text, this allows u to do stuff like on hud draw except for one player at a time.
lol, yeah, that's what I thought, but HOW?!
Elgan wrote:what game are you running? AA? SH and BT might need diff widgets, i see as it worked for u its probs AA ur using.
Well, it IS AA but I had to comment out the if-clause, lol. :shock:
Elgan wrote:So, as for needing a LAN, maybe this will help. cough*no link here*cough
I get an access denied there, but my LAN is just in lack of my 1st PC which lost it's RAID controller last week. :cry: So I'm just temporarily handicapped. :wink:
edit: yeah, cough,lol, got it. nice gadget :wink:

Posted: Mon Nov 21, 2005 6:59 pm
by Elgan
wacko wrote:
Elgan wrote:u cud manipulate the widgest to just a line of text, this allows u to do stuff like on hud draw except for one player at a time.
lol, yeah, that's what I thought, but HOW?!

as i did, stufftext the command and then widget commands to change it how u want.

Best look at the urc menu's or use dlgedit to make something, then copy what it did into script. stufftext the globalwidgetcommand followed by the menu name and what u wanna do to it.

say u wanted it to be long thing rectangle. where u can put writing inside. do

rect 64 73 120 25

self stufftext "globalwidgetcommand june6 rect 64 73 120 25"

best to look at the cl_allclasses.htm.

u can just use the dday1 as its made translparent. then use june as ur main block to work with.

see what u get with

Code: Select all



   self stufftext "globalwidgetcommand dday1 shader townhallwindow"
   self stufftext "globalwidgetcommand dday1 fgcolor 1.00 1.00 1.00 1.00"
   self stufftext "globalwidgetcommand dday1 bgcolor 0.50 0.50 0.50 0.00"
   self stufftext "globalwidgetcommand dday1 fadein 0"
   self stufftext "globalwidgetcommand dday1 menu dday1 640 480 NONE 0"
   self stufftext "globalwidgetcommand dday1 virtualres 1"
   self stufftext "globalwidgetcommand dday1 fullscreen 1"


   self stufftext "globalwidgetcommand june6 borderstyle NONE"
   self stufftext "globalwidgetcommand june6 shader textures/hud/healthback"
   self stufftext "globalwidgetcommand june6 rect 16 420 120 25
   self stufftext "globalwidgetcommand june6 fgcolor 1.00 1.00 1.00 1.00"
   self stufftext "globalwidgetcommand june6 bgcolor 0.00 0.00 0.00 0.00"
   self stufftext "globalwidgetcommand june6 linkcvar dmplayerhealth"

self stufftext "set dmplayerhealth Seconds-14"
didnt test, just a guess

Posted: Mon Nov 21, 2005 8:42 pm
by wacko
omg. it's soo nice of u tryin to explain this but this is sooo far from anything I did before... What is, why june6? Why dday1 or 2. Where does that come from?? Where does this lead to (to ages of trial and error, probably)?!
I think, we'd better stop this here. Don't feel offended but scripting itself is still so confusing for me :wink: that I dont think ummm that this would make much sense right now :oops:

Posted: Mon Nov 21, 2005 10:00 pm
by Elgan
well if u dont want to carry on thats cool. i will explain anyway for the sake of the forum browser.

june6 and dday1 are both names of widgets that cna be found inside the main parent widget of the dday1.urd , this widget is used in a single player map for showing some text.

all widgets have names, most are named "default" however if u find widgets with names that are totaly unique then you can use globalwidgetcommand to fiddle with this widget and change its attributes.

june and dday are both unique names and cannot be ofund in any other widget in mohaa. This allows you to customize them. then show them up on the client using showmenu parentname.

Possible all the unique widgets have been found already so if need them give me a bell and ill dig em out. They are simply going through urc files and looking at their name. just be looking at the type of menu they are can usualy tell you enough to bother opening it or not. so its a fast processs.

Posted: Fri Nov 25, 2005 11:42 pm
by sorridstroker
yup globalwidgetcommand is very usefull :D

shame their are not many usable widgets...

although I did think of away to increase the usabilty of each widget if you want them for simple text based menu's - it's a little tricky to implement but seems to work ok :)

create a custom tik file something like this:

Code: Select all

TIKI
setup
{
	scale 0.52				// Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
	path models/fx/dummy
	skelmodel dummy3.skd

}

init
{
	server
	{

		setsize	"-4 -4 0" "4 4 4"
		classname InventoryItem
		name ""
		rank 1 1
		firetype clickitem
		semiauto
		ammorequired 0	
		usenoammo 1
		firedelay 0.75	
		bulletrange 8000
		crosshair 0




	}
}

animations
{
	idle     dummy3.skc

	
}
then do something like this:

Code: Select all

	self takeall
	self give models/weapons/weapon_menu.tik
	self use models/weapons/weapon_menu.tik
	self activatenewweapon


	self weaponcommand mainhand name  "Primary Weapon. \n \n \n \n [Strafe Right].Allied \n [Strafe Left].Axis"
	

	self stufftext "globalwidgetcommand dday1 shader townhallwindow"
	self stufftext "globalwidgetcommand dday1 fgcolor 1.00 1.00 1.00 1.00"
	self stufftext "globalwidgetcommand dday1 bgcolor 0.50 0.50 0.50 0.00"
	self stufftext "globalwidgetcommand dday1 fadein 0"
	self stufftext "globalwidgetcommand dday1 menu dday1 640 480 NONE 0"
	self stufftext "globalwidgetcommand dday1 virtualres 1" 
	self stufftext "globalwidgetcommand dday1 fullscreen 1" 

	self stufftext "globalwidgetcommand june6 borderstyle NONE"
	self stufftext "globalwidgetcommand june6 shader townhallwindow"
	self stufftext "globalwidgetcommand june6 textalign left " 
	self stufftext "globalwidgetcommand june6 rect 40 40 500 500"
	self stufftext "globalwidgetcommand june6 fgcolor 1.00 1.00 1.00 1.00"
	self stufftext "globalwidgetcommand june6 bgcolor 0.50 0.50 0.50 0.00"
	self stufftext "globalwidgetcommand june6 font facfont-20"
	self stufftext "globalwidgetcommand june6 itemstat 1" 
	//self stufftext "globalwidgetcommand june6 outlinedtext 1"
	self stufftext "showmenu dday1"
means you can get more than one line of text out of a widget.


the weapon thingy I posted up uses that example..