Forum Jump :

Author Message


Posts: 27
Rank:


Level: Member

Country: uk
Location: South West England
Occupation: PHP Ninja
Age:
In-game name: TacticalExplosive

 
#1 Posted at 2012-07-29 16:53        
     
Right, let me just start off by saying that I've looked a lot on forums etc. to find a way for markers to be invisible when the game starts.

Is there a way to do this? What if I used the setMarkerAlpha command in the init.sqf file? I need multiple markers to be invisible. The reason I'm looking to do this is because I'm creating a procedural mission where a objective appears after the previous has been completed; I've found out how to do this with no problems at all, but I'd like to have the markers used in the objective/briefing file to be invisible so that players don't run around finishing the objective in a random order just by looking on the map for markers.

Thanks


Author Message


Posts: 20679
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 44
In-game name: Foxhound

 
#2 Posted at 2012-07-29 17:21        
     
Just create the markers when you need them using the createmarker command?
Also you can move the markers to a temp location like in the sea and move them whenever you need them by setting their position (setpos command).


[edit]
fixed typo

This post was edited by Foxhound (2012-07-29 17:32, ago)


Advertisement


Author Message


Posts: 27
Rank:


Level: Member

Country: uk
Location: South West England
Occupation: PHP Ninja
Age:
In-game name: TacticalExplosive

 
#3 Posted at 2012-07-29 17:30        
     
I'll look into that, and if it works (or doesn't) I'll post back.

Thanks again ;)

Added 9 minutes later:

What would be the syntax? Looking at the BI pages for each command, would it be something like this?

Trigger:
Condition: !alive <unit_name>
On Act: "2" objStatus "Done"; 
tskobj_2 setTaskState "Succeeded"; 
player setCurrentTask tskobj_32; 
hint "2 of 3 signal jammers destroyed."; 
nul = [] execVM "objective_3.sqf";_
marker = createMarker [<marker_name>, <position>];
//What is the syntax for specifying a position?
<new_marker_name> setMarkerText <insert_text_here>;
<new_marker_name> setMarkerType <insert_merker_type>;

Would that be it? I have a basic idea of the syntax Lua uses, but I'm not entirely sure.

This post was edited by jaydotosh (2012-07-29 17:39, ago)


Author Message


Posts: 1523
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2012-07-29 23:48        
     
Small working example
If you have a tank named tank and you want to pop a marker on it when destroyed it would be as follows.

name you tank tank

place a trigger
cond
!alive tank

on act
hint "tank destroyed!!"; marker = createMarker ["Destroyed",getpos tank];marker setmarkertype "DestroyedVehicle";marker setmarkersize [5, 5]; marker setMarkerColor "ColorRed"


Also you can set your markers invisible any time

The only thing to remember is that editor placed markers need the name in quotes created markers can use the created handle or the marker name

"Destroyed" setMarkerAlpha 0;
or
marker setMarkerAlpha 0;


0-1 sets the transparency.


Author Message


Posts: 509
Rank:


Level: Member

Country: se
Location:
Occupation:
Age: 26
In-game name: Oksman

 
#5 Posted at 2012-07-29 23:50        
     
I usually just name markers on the map marker1,2,3 or what .hing I need. Find it way easier than creating a whole new marker.

http://community.bistudio.com/wiki/setMarkerShape
http://community.bistudio.com/wiki/setMarkerType


Author Message


Posts: 27
Rank:


Level: Member

Country: uk
Location: South West England
Occupation: PHP Ninja
Age:
In-game name: TacticalExplosive

 
#6 Posted at 2012-07-30 14:25        
     
Thanks guys, I'll give it a whirl and see how that goes ^^

Edit:
Sorry, didn't get much time this week, but I'll give it a go this weekend (tomorrow or the day after) %)

This post was edited by jaydotosh (2012-08-03 21:41, ago)


Author Message


Posts: 27
Rank:


Level: Member

Country: uk
Location: South West England
Occupation: PHP Ninja
Age:
In-game name: TacticalExplosive

 
#7 Posted at 2012-09-10 22:23        
     
# jaydotosh : Thanks guys, I'll give it a whirl and see how that goes ^^

Edit:
Sorry, didn't get much time this week, but I'll give it a go this weekend (tomorrow or the day after) %)

Worked like a charm.