![](https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://secure.gravatar.com/avatar/000b2d2207ea3905d04334f52d87d317?d=https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
Spinor
-
Content Count
208 -
Joined
-
Last visited
-
Medals
Posts posted by Spinor
-
-
If you plan to let them seek and destroy (in a random fashion) indefinitely the waypoint method I mentioned would be the easiest and best.
I just mentioned the Move command if you want to have more control over the group, e.g. if you need a certain search pattern.
Spinor
-
Hi,
to your first question: You can put any check you want in the condition field. If you want to restrict it to one player use
this AND (player == radioOfficer)
where radioOfficer would be the name of the specific player's unit you are referring to (i.e. put radioOfficer in its Name field).
Some general remarks about moving groups:
with
group Move position
you can order a group to a specific position, e.g.
reinfGroup Move (GetPos radioOfficer)
The problem is this shouldn't be mixed with standard waypoint movement. Another possibility is to move a given wapoint (before the group reaches it) with the SetWPPos command. I'm not sure about the syntax, best is to check the Official command reference.
So in principle you could activate (so the reinforcements wait until call) and move the "search and destroy" waypoint
by synchronizing it with the radiotrigger.
Spinor
-
I think its possible but you have to do two things:
1. Make the radio triggers side specific. E.g. o create a radio trigger that is only activated by the WEST side put this in in its Condition field:
this AND (Side player) == WEST
The command player returns the human player on the local machine and the whole expression only becomes true if a WEST player selects the radio slot.
2. If you want different radio messages (just the text) to appear for EAST and WEST you have to use the SetRadioMsg command to edit them specifically for each side. The easiest way is to make a script "init.sqs" (automatically called at startup):
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
?(Side player == WEST): Goto "WestRadio"
?(Side player == EAST): Goto "EastRadio"
Goto "NoRadio"
;THIS PRINTS THE RADIOMENU FOR WEST
#WestRadio
1 SetRadioMsg "Call Blackhawk"
2 SetRadioMsg "Call M1 Platoon"
...and so on
Goto "End"
;THIS PRINTS THE RADIOMENU FOR EAST
#EastRadio
1 SetRadioMsg "Call Hip"
2 SetRadioMsg "Call T80 Platoon"
...and so on
Goto "End"
;THIS DELETES ALL ENTRIES IF PLAYER IS
;NEITHER WEST OR EAST (ALSO DEACTIVATES
;THE RADIO COMPLETELY)
#NoRadio
1 SetRadioMsg "null"
2 SetRadioMsg "null"
...and so on
#End
Exit
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I hope this helps (and works),
Spinor
-
Try my Command Engine (includes a complete mission) over at the OFP editing center (Command Engine by Spinor in the code snippets section). In the mission you are in command of a platoon consisting of three squads + your own squad.
Hope zou like it,
Spinor
-
I'd like to help, but
hhhhhhhhooooooooooowwwwwwwwwww
-
The +2, -2 are just an offset of two meters, otherwise all soldiers are spawned at exactly the same position. You can put any numbers in there, making the spread larger or smaller as you like it.
Spinor
-
For the following script to work you have to create
the sic soldiers mia0, mia1,... in the editor and put
them far away from the battlefield (on a small island
maybe). Calling the following script like
[x,y,z] exec "spawn.sqs" will spawn the six soldiers
around the position [x,y,z].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[x,y,z] exec "spawn.sqs"
_x = _this select 0
_y = _this select 1
;these commands simply place the soldiers
;around [x,y,z]
mia0 SetPos [_x, _y, 0]
mia1 SetPos [_x+2, _y, 0]
mia2 SetPos [_x-2, _y, 0]
mia3 SetPos [_x, _y+2, 0]
mia4 SetPos [_x, _y-2, 0]
mia5 SetPos [_x+2, _y-2, 0]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I actually don´t know how to trigger the event
of blowing up a building (do you mean special
buidlings or any building on the map). For special
buidlings try to use Gunslingers addon to create
namedn buildings and check their damage like
GetDammage buildingname >= 1.0
-----> activate trigger with action
(GetPos buildingname) exec "spawn.sqs"
Hope this helps,
Spinor
-
You can use the Move command for that:
group Move [x,y,z]
e.g. mygroup Move (GetPos player)
Spinor
-
Cool indeed, this can be very useful. After reading your post, I scanned the official BIS reference and found this under the exec command:
"Script is first searched in mission folder, then in campaign scripts subfolder, last in global scripts folder."
One thing that I found out is that you can create subfolders within your mission folder and put your scripts in there. When calling the script you have to include the path, like
[] exec "myscripts\barrage.sqs"
Spinor
-
In singleplayer I always refer to
"_USER_DEFINED #0/X"
as the markername, i.e. the first number is always zero. Maybe the first number refers to the players (or different sides) in multiplayer.
Just a guess,
Spinor
-
Use the AllowFleeing command:
unit AllowFleeing number
where number is from 0.0 to 1.0, the probability that the unit will run away.
If you want to a whole group immune to fleeing put this in the Init field of its leader:
"_x AllowFleeing 0.0" ForEach (Units (Group this))
Hope this helps,
Spinor
-
@Wardog: With the SetRadioMsg command you can change the text that appears in the radio for the respective channel, like
channel SetRadioMsg "text"
where channel is a number from 1 to 8 corresponding to the radio channels Alpha,...,Hotel. Example:
2 SetRadioMsg "Call Support"
Using the special string "null" you can deactivate the radiochannel (even with working radio trigger).
-
@Wardog and RAMBO: Do you use the SetRadioMsg command to assign a string to the radio channel. When creating a radio trigger a default string is assigned but maybe this only happens for the host. May be this explains why sometimes only the host can make radio calls.
@RAMBO: Did you read my reply to your Radio problem question. Maybe this is related to it.
-
I think I can help you with your first problem. Use a script at mission start (e.g. the init.sqs) to create the radio buttons:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;creates radiobuttons, to be called at missionstart
;this tests whether the local player (Player is a local
;variable) is someguy, e.g. a group leader
?(Player == someguy): Goto "ACTIVATE"
;if not, deactivate radiobuttons putting strings to "null"
1 SetRadioMsg "null"
2 SetRadioMsg "null"
...
Goto "END"
;if true, activate the buttons
#ACTIVATE
1 SetRadioMsg "Call Artystrike"
2 SetRadioMsg "Call Airstrike"
....
#END
Exit
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The radio triggers should be setup as normal.
The effect is that only the human player that takes the role of "someguy" can see the buttons and use the radio.
For the second problem I can only make the guess that something (a script you called or for some reason the radio trigger) ran local only on your machine.
-
The triggers refer to the slots in the radio, first to Radio Alpha, etc. Thus clicking the first slot activates the "Radio Alpha" trigger.
You can change the messages appearing in the radio like
x SetRadioMsg "text"
where x is the radio slot 1,...,8 e.g.
1 SetRadioMsg "Call air support"
Hope this helps,
Spinor
-
Thanks Assulter, I'm gonna send it to you when I get home.
If someone else wants to download it, maybe it is better to try pcverdens homepage,
http://pcverden.topcities.com/
and click "Taking command II" under new missions.
-
bump.........
-
I´m currently working on a command system that allows the player to control up to 5 groups. I have already created a mission that uses this feature. I´d like to invite everyone to test both the actual mission and the command sytem.
pcverden kindly posted the mission on his site:
<a href="http://pcverden.topcities.com/Missions/Command.zip
Thanx" target="_blank">http://pcverden.topcities.com/Missions/Command.zip
Thanx</a> in advance,
Spinor
-
Well...there are actually two ways to do it:
You can move the marker of the map, e.g.
"markername" SetMarkerPos [-10, -10, 0]
or you can change the marker type to empty
"markername" SetMarkerType "Empty"
You can do this also within the editor. Simply choose markertype "Empty". The marker appears in the editor but not ingame.
Spinor
-
Simply put this in the activation field of a trigger:
<x> SetRadioMsg "<text>"
The radio command can only be selected if it is activated in this way. You can disactivate it with
<x> SetRadioMsg "null"
Limit radio msg to certain person/team
in OFP : MISSION EDITING & SCRIPTING
Posted
Put this in the Condition field of the radiotrigger:
this AND (player == <someguy>)
where <someguy> is some unit´s name (e.g. alphaLeader). This should restrict the radiochannel to <someguy>
Hope this helps,
Spinor