Home   Help Search Login Register  

Author Topic: How to make my civi turn east  (Read 2092 times)

0 Members and 1 Guest are viewing this topic.

Offline megz

  • Members
  • *
How to make my civi turn east
« 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?

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
Re: How to make my civi turn east
« Reply #1 on: 16 Sep 2007, 22:30:48 »
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"
Campaigns are hard, I'll stick with scripting for now!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: How to make my civi turn east
« Reply #2 on: 17 Sep 2007, 01:04:50 »
its not possible 4 a unit 2 change sides...  :(

as 4 da oder thingy... use da oder type of creatunit

unit  = "soldierWB" createUnit pos (Position), group (Group),init (String), skill (Number), rank (String)]

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Nixer6

  • Members
  • *
Re: How to make my civi turn east
« Reply #3 on: 17 Sep 2007, 08:44:31 »
But...........U can change sides in the misssion .sqm....right?
Why do I have to be a Rocket Scientist to make a good mission?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: How to make my civi turn east
« Reply #4 on: 17 Sep 2007, 08:45:20 »
Kinda hard to edit the mission.sqm while the mission is running.  ;)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: How to make my civi turn east
« Reply #5 on: 17 Sep 2007, 13:38:26 »
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.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: How to make my civi turn east
« Reply #6 on: 18 Sep 2007, 23:57:27 »
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.

Offline Dobermann

  • Members
  • *
  • Ready to disturb you anytime

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: How to make my civi turn east
« Reply #8 on: 19 Sep 2007, 21:39:12 »
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.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: How to make my civi turn east
« Reply #9 on: 19 Sep 2007, 22:01:15 »
That way you change the alignment but not the side.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: How to make my civi turn east
« Reply #10 on: 20 Sep 2007, 16:08:16 »
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. 

Offline megz

  • Members
  • *
Re: How to make my civi turn east
« Reply #11 on: 23 Sep 2007, 13:42:59 »
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 :)

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: How to make my civi turn east
« Reply #12 on: 26 Sep 2007, 02:28:04 »
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
just setpos & forgetpos!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: How to make my civi turn east
« Reply #13 on: 26 Sep 2007, 05:56:57 »
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
« Last Edit: 26 Sep 2007, 05:59:06 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: How to make my civi turn east
« Reply #14 on: 26 Sep 2007, 13:28:13 »
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
« Last Edit: 26 Sep 2007, 13:32:04 by Planck »
I know a little about a lot, and a lot about a little.