IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
 
Reply to this topicStart new topic
> Marker & Trigger
BlackE
post Jul 14 2010, 09:40
Post #1


New Member
*

Group: Members
Posts: 4
Joined: 28-January 10
Member No.: 7,149



Hi, Does anyone know how to make a marker appear when a trigger is activated, or when they reach to a waypoint?

Thanks.
 
Quote Post
D@V£
post Jul 14 2010, 12:43
Post #2


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



You can use setmarksize to hide a marker.
CODE
MyMarker setmarkersize [0,0]

To hide a marker
CODE
MyMarker setmarkersize [1,1]

To display it again. You can use any value in the palce of [1,1] to make the marker the size you want.

If you want a marker hidden on mission start, rather than hiding it in the editor, making it impossible to find when you want to, it's better to use the first bit of code in your initialization script. If you've got a file called "init.sqs" in the root directory of your missions folder, it'll automatically be run before the mission is started smile.gif

For a simple init.sqs file you could have something like this:
CODE
"3" objStatus "HIDDEN"
OBJ3Mark setmarkersize [0,0]
"4" objStatus "HIDDEN"
OBJ4Mark setmarkersize [0,0]
"6" objStatus "HIDDEN"
OBJ6Mark setmarkersize [0,0]
"8" objStatus "HIDDEN"
OBJ8Mark setmarkersize [0,0]

exit

(The objstatus commands are for objectives that would be seen in the briefing or map screens, they aren't relevant to hiding or displaying markers, but I thought it'd be worth including, to show other uses of the init.sqs file!)


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
BlackE
post Jul 14 2010, 17:26
Post #3


New Member
*

Group: Members
Posts: 4
Joined: 28-January 10
Member No.: 7,149



QUOTE(D@V£ @ Jul 14 2010, 12:43) *
You can use setmarksize to hide a marker.
CODE
MyMarker setmarkersize [0,0]

To hide a marker
CODE
MyMarker setmarkersize [1,1]

To display it again. You can use any value in the palce of [1,1] to make the marker the size you want.

If you want a marker hidden on mission start, rather than hiding it in the editor, making it impossible to find when you want to, it's better to use the first bit of code in your initialization script. If you've got a file called "init.sqs" in the root directory of your missions folder, it'll automatically be run before the mission is started smile.gif

For a simple init.sqs file you could have something like this:
CODE
"3" objStatus "HIDDEN"
OBJ3Mark setmarkersize [0,0]
"4" objStatus "HIDDEN"
OBJ4Mark setmarkersize [0,0]
"6" objStatus "HIDDEN"
OBJ6Mark setmarkersize [0,0]
"8" objStatus "HIDDEN"
OBJ8Mark setmarkersize [0,0]

exit

(The objstatus commands are for objectives that would be seen in the briefing or map screens, they aren't relevant to hiding or displaying markers, but I thought it'd be worth including, to show other uses of the init.sqs file!)


Thanks, but setmarkersize dont work,i tried to put it in trigger(ON ACT), but it still shows on the map, I played some missions and when you get at objective(marker) another one appear on map.....sorry for bad english
 
Quote Post
D@V£
post Jul 14 2010, 18:45
Post #4


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



Sorry, forgot something important, marker names are set up as strings for some reason, for you need to put them in quotation marks when referencing them, you should use:
CODE
"MyMarker" setmarkersize [0,0]

Instead.

Apologies, I'll try to remeber that for the future tongue.gif

Something else I forgot, you can also use setmarkertext to hide the text for a marker. Usage is pretty much the same, just two strings:
CODE
"MyMarker" setmarkertext "Look at this"

Removing the text is as simple as using a blank string:
CODE
"MyMarker" setmarkertext ""


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
SGJackson
post Aug 28 2010, 04:48
Post #5


Member
***

Group: Members
Posts: 131
Joined: 22-May 10
Member No.: 7,651



Humh... if he's doing it via trigger then he's doing it locally... that means that this is the right command:

CODE
"MyMarker" setmarkersizelocal [0,0]


The other way is for scripts tongue.gif

Sorry if I answered too late, didn't think this is too far from Jul 14....
 
Quote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th April 2024 - 22:36