Page 1 of 1

Modify a marker using a client side script

Posted: 23 Feb 2013, 19:01
by Akbalder
I tried to modify a marker using a client side script but it doesn't seem to work. :evil:
On the client side, UI.Hud3dMarkers = "something" seems to have no effect.
Does anyone know how to do it?

Re: Modify a marker using a client side script

Posted: 23 Feb 2013, 19:18
by steeffeen
i don't know why but you can't modify the UI from the client side script, even BigMessage and stuff like that can't be modified

for dynamic markers i suggest looking into the realm script or my speedball2 beta version

Re: Modify a marker using a client side script

Posted: 23 Feb 2013, 19:22
by steeffeen
small tutorial:

- create the hud3dmarker

Code: Select all

UI.Hud3dMarkers = """<marker pos="1 2 3" manialinkframeid="Marker_Frame"/>"""
- create the markers layer

Code: Select all

declare MarkersLayer <=> UIManager.UILayerCreate();
MarkersLayer.Type = CUILayer::EUILayerType::Markers;
UIManager.UIAll.UILayers.add(MarkersLayer);
- create the manialink for markers layer and modify the marker itself with it

Code: Select all

<frame id="Marker_Frame" hidden="1">
	<label id="Label"/>
</frame>
<script><!--
main() {
	declare Label <=> (Page.GetFirstChild("Label") as CMlLabel);

	Label.Value = "Marker text";
}
--></script>

Re: Modify a marker using a client side script

Posted: 23 Feb 2013, 20:21
by Akbalder
With this method, the markers don't look like the default markers. :?

EDIT: Does Anyone know the style used by default markers?

Re: Modify a marker using a client side script

Posted: 23 Feb 2013, 20:56
by steeffeen
Akbalder wrote:With this method, the markers don't look like the default markers. :?

EDIT: Does Anyone know the style used by default markers?
i tried to find the style representing the default markers.. but couldn't find the correct one :/
in speedball i added a quad with bgcolor="aaa6"

Re: Modify a marker using a client side script

Posted: 05 May 2013, 17:47
by steeffeen
this isn't exactly about the initial topic but still concerning Hud3dMarkers:

1. may it be possible to assign a specific manialinkframe in a Markers ManialinkPage to multiple Hud3dMarkers? that would be great as a mode may need a variable number of markers with the same style

2. could a frame with hidden="1" set hidden automatically again after its Hud3dMarker has been removed please? right now the frame is hidden until an according marker is set, then it's visible - good, but it stays visible when the marker isn't set anymore leading to a manialink control somewhere on the screen :/

3. it would be great if we could use multiple ::Markers UIlayers, because now only a single one is working

Thanks in advance! :thx:

Regards
Steff