OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: megz on 16 Sep 2007, 22:15:29
-
Hello, i want to make my civie turn east at a certain point in the game, i have tried grouping him to another group of east using:
[f1] joinSilent me
f1 being an east soldier of hight rank. But it doesnt work
I have tried creating an east unit and then deleting them using:
unit = group player createUnit ["SoldierEB", position player, [], 0, "FORM"]
deleteVehicle unit
still doesn't work
I also know the edit mission.sqm file and setcaptive true trick but i don't wanna use it because my mission is almost complete and that would me redoing a serious amount of triggers.
Anyone know how to do it?
just another Q, this bit of code here:
unit = group player createUnit ["SoldierEB", position player, [], 0, "FORM"]
How do i set the units rank?
-
im not sure if its possible to switch a units side after the games started, if you find out let us know :D
heres an example on setting ranks:
player setUnitRank "COLONEL"
-
its not possible 4 a unit 2 change sides... :(
as 4 da oder thingy... use da oder type of creatunit (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#createUnit)
unit = "soldierWB" createUnit pos (Position), group (Group),init (String), skill (Number), rank (String)]
LCD OUT
-
But...........U can change sides in the misssion .sqm....right?
-
Kinda hard to edit the mission.sqm while the mission is running. ;)
-
Think you will probably have to delete the "civilian" civilian and re-create him as an "opfor" civilian. This will work better if you create an identity for the civilian so that you can recreate him with the same name/face.
-
AFAIK you cannot turn a unit into anyother side that its initial one except sideEnemy (renegares after killing friendly units). What you can do is to change the alignment of the units grouping them with other side groups, but the side remains the same so you cannot use triggers based on sides to detect their presence after switching alignment. IMO this is another and quite notorious ArmA bug.
-
I´m not sure if this is of use in your context, but you could try to make use of the setFriend command introduced with Arma. Still, it would
change the alliance-relations for all units of a faction.
http://community.bistudio.com/wiki/setFriend (http://community.bistudio.com/wiki/setFriend)
-
Could you not get him to join a east unit who has a higher rank ? I know this works in the editor, but you could try with the join command.
-
That way you change the alignment but not the side.
-
I think a decent solution here really is to have two civilians created, let's call them "CivNeutral" and "CivEAST." Use CivNeutral in the game early on as you like, and place CivEAST on one of the side islands away from the fray. CivEAST can also be grouped with an EAST soldier with zero % probability of presence. Both civilians can have their identities set to the same name "Bob" or whatever, with the same faces and clothing. After the event where your civilian changes sides:
1) have a gamelogic setpos to CivNeutral's location
2) deletevehicle "CivNeutral"
3) CivEAST setpos getpos to the gamelogic
You are basically just swapping the person out for a new one, but the player won't know since the person looks the same etc.
-
Hi and thanks for the reply's.
I opted to use the "edit mission file" way instead so i had to change all the triggers.
There are some very interesting ways to do this though that i am sure will come in handy in future missions and for people looking to solve the same prob i had
Thanks again :)
-
Easiest way to make a civie turn east:
Place unit facing west and then have him turn around!
...if that doesn't work, try placing him facing north and then turn right 3 times!
- man Im a genius. :D
-
WoW :blink: :o
never tought bout dat but D_P_ is right
sugest u implent dat thing in ur next mision D_P_ :P :D
btw another fool proof way wud b 2 put
unitname setdir 90 :P and it doesnt even matter were he was lookin at wen u started :D
LCD OUT
-
Placing a unit facing north and getting him to turn right 3 times results in a unit facing west, not east.
This of course illustrates the need for well worded topic titles. :yes:
Planck