Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Nielk1 on June 21, 2008, 07:31:56 AM

Title: NotifyParent()
Post by: Nielk1 on June 21, 2008, 07:31:56 AM
All of us CFG editors know this:
NotifyParent("Button::Press", "Quit");

Where when the event 'Press" as described by the 'Button' class occurs (this would be a button BTW), it sends the "Quit" message to the parent.

What other Class::Event combinations are there? I want to make it so mouseovering notifies the parent to change a text variable to display in a label. In short, you mouse over buttons and 1 spot tells you what they are.

EDIT:
NotifyParent("Button::Select", "Options");
works if the
Style();
includes
"RADIO"
Title: Re: NotifyParent()
Post by: bigbadbogie on June 21, 2008, 09:35:41 AM
wasnt all that cfg stuff changed in pb4??

and i was just starting to learn it too :cry:
Title: Re: NotifyParent()
Post by: Nielk1 on June 21, 2008, 04:43:49 PM
No, it was just expanded to make use of some new features. Most old code still works in it, except for the ammo/hull guages, those are a bit off in old CFGs (cause of the missing ammo and hull color groups).
Title: Re: NotifyParent()
Post by: General BlackDragon on June 21, 2008, 06:31:34 PM
CFG things werent changed in pb4, only abilities added to change health and ammo bars to whatever u bloody want :)

Also, Yes radio only works wiht button:Select

I havn't experimented with other types, but perhaps rollover style and Button:Rollover? I doubt it'd work though.
Title: Re: NotifyParent()
Post by: bigbadbogie on June 21, 2008, 10:29:58 PM
which cfg do i need to edit to change hull and ammo??

is it bzgame_command or bzgame_weapon??
Title: Re: NotifyParent()
Post by: General BlackDragon on June 21, 2008, 10:35:03 PM
bzgame weapon from pb4.
Title: Re: NotifyParent()
Post by: bigbadbogie on June 21, 2008, 10:44:39 PM
All that one seems to do is change the numbers - how can I change the actual gauge??
Title: Re: NotifyParent()
Post by: Nielk1 on June 21, 2008, 11:10:33 PM
Something about creating a gauge with a certain name will make the normal one not show. H/O, lemme get my 2 interface tests.

EDIT:
Images link to 7z files.
(http://www.bzcomplex.com/gallery/albums/userpics/10002/circleguages.jpg) (http://www.bzcomplex.com/gallery/albums/userpics/10002/circleguages.7z)
(http://www.bzcomplex.com/gallery/albums/userpics/10002/curvycenterguages.jpg) (http://www.bzcomplex.com/gallery/albums/userpics/10002/curvycenterguages.7z)
Title: Re: NotifyParent()
Post by: bigbadbogie on June 21, 2008, 11:38:11 PM
thankyou - that will definitely help
Title: Re: NotifyParent()
Post by: GSH on June 23, 2008, 12:21:59 AM
Checking the source code, here's the ones that can be generated within code.

Quote
NotifyParent("Button::Deselect");
NotifyParent("Button::Press");
NotifyParent("Button::Select");
NotifyParent("Control::Activate");
NotifyParent("Control::Deactivate");
NotifyParent("Control::FinishFadeIn");
NotifyParent("Control::FinishFadeOut");
NotifyParent("Control::NextTab");
NotifyParent("Control::PrevTab");
NotifyParent("Control::StartFadeIn");
NotifyParent("Control::StartFadeOut");
NotifyParent("Edit::Enter");
NotifyParent("ListBox::DblClick");
NotifyParent("ListBox::SelChange");
NotifyParent("Timer::TimeOut");

Not all of these may be executed for every control. Use at your own risk.

-- GSH
Title: Re: NotifyParent()
Post by: Nielk1 on June 23, 2008, 12:39:21 AM
ooooo

Request more info on, Timer
Title: Re: NotifyParent()
Post by: GSH on June 23, 2008, 12:46:15 AM
Scan the stock .cfg files. If it's not found in there, then it's never been tested in 8+ years. And therefore, probably quite buggy.

Nathan's rule of code: if it's not actively tested, it's probably buggy.

-- GSH
Title: Re: NotifyParent()
Post by: Nielk1 on June 23, 2008, 12:49:11 AM
Like when I put a texture on the guage used for unit builds and it died at a certain %
Title: Re: NotifyParent()
Post by: bigbadbogie on June 23, 2008, 02:34:10 AM
Quote from: Nielk1 on June 23, 2008, 12:49:11 AM
guage

Phew - I thought that I was the only one who spells it like that...
Title: Re: NotifyParent()
Post by: General BlackDragon on June 23, 2008, 04:47:57 PM
Gauge!
Title: Re: NotifyParent()
Post by: bigbadbogie on June 24, 2008, 11:57:33 PM
Another question: which one controls the radar? - I cant seem to find it anywhere.
Title: Re: NotifyParent()
Post by: Nielk1 on June 25, 2008, 01:54:18 AM
Those are in gameprefs and can be overridden by writing custom lines into a local prefs file. DO NOT EDIT GANEPREFS! IT IS ASSET CHECKED!