Jump to content
Sign in to follow this  
Purzel

Marker not getting created.

Recommended Posts

Hi folks,

I don´t get it.

A marker should be initally not be visible,

then after a trigger-activation a landingzone marker should become visible for all (multiplayer).

trigger activation:

nul=[] execVM "scripts\lzmarker.sqf";

marker stuff inside the lzmarker.sqf :

_nametrigger = _this select 0;
_marker = format["%1",_nametrigger];
_marker = createMarkerLocal [_marker, position _nametrigger];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerBrushLocal "PICKUP";
_marker setMarkerSizeLocal [1,1];
_marker setMarkerColorLocal "ColorWEST";

But this does not work.

I´ve tried around with some scriptings stuff from the internet, but nothing..

I called the landingzone (empty objects, invisible Helipad) "lz" and would like to use that position as the markers position.

Please help & Thanks a lot!

Greetings Purzel

Share this post


Link to post
Share on other sites

nul=[[color="#FF0000"]empty[/color]] execVM "scripts\lzmarker.sqf";

And this tries to get the empty stuff...

_nametrigger = _this select 0;

You get it?

Share this post


Link to post
Share on other sites

Basically, you just need to do this (as Buliwyf correctly pointed out):

nul=[thisTrigger] execVM "scripts\lzmarker.sqf";

Share this post


Link to post
Share on other sites

Thanks guys,

but I don´t understand some higher scripting stuff (especially within combination of my english capabilities) ...

So I have often problems to get things right.

The last code means what?

nul=[thisTrigger] execVM "scripts\lzmarker.sqf";

what means "thisTrigger"...?

Is it a name of the trigger, that triggers the lzmarker.sqf..?

And for my general understanding:

Do I have to set a marker (lzmarker) to the map and set it somehow invisible, the trigger it visible

or

do I have to create a marker, which is not persistant before creation...?

and now the bad message:

markerfailw6olx.jpg

It does not work, because the pickup-marker is not found..?

What do i have to do?

Greetz Purzel

Edited by Purzel

Share this post


Link to post
Share on other sites

Totally chaos! :D

Take a look at the Scripting Command: setMarkerBrushLocal

There is no "PICKUP" available. I have no idea where you get it....

Maybe you need setMarkerTypeLocal instead of setMarkerBrushLocal: setMarkerTypeLocal

:confused:

...and thisTrigger says it all i guess. It is what it is... the trigger itself... :)

and btw. there are german scripting forums too.. like: Forum of Armed-Assault.de

Share this post


Link to post
Share on other sites

thisTrigger is a magic variable within the "condition" and "on act." fields of a trigger which refers to the trigger itself.

As for your error. You're trying to set a brush with marker shape "icon". I suggest you check out this wiki page to set the icon: setMarkerTypeLocal

Edit: Ninja'd again! :cool:

Share this post


Link to post
Share on other sites

trigger activation:

Code:

nul=[thisTrigger] execVM "scripts\lzmarker.sqf";

marker stuff inside the lzmarker.sqf :

Code:

_nametrigger = _this select 0;
_marker = format["%1",_nametrigger];
_marker = createMarkerLocal [_marker, position _nametrigger];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "PICKUP";
_marker setMarkerSizeLocal [1,1];
_marker setMarkerColorLocal "ColorWEST";

..no higher scripting stuff...

Share this post


Link to post
Share on other sites

Thank you for your help, I had it like that, but it does not work.

What is _nametrigger?

The marker should not be created at the position of its trigger...

The marker should appear instead at the position of an invisible helipad...

Share this post


Link to post
Share on other sites

here is just a simple marker script not sure if it works did not test it yet but should work just fine and this will create the marker on the player

_marker = createmarkerlocal ["_marker", getpos player];
_marker setmarkertypelocal "mil_pickup";
_marker setmarkercolorlocal "blue";
_marker setmarkertextlocal format ["%1 you are here!",name player];

Share this post


Link to post
Share on other sites

THANK YOU ! This is working!

great! :cheers::ok::pc:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×