Home   Help Search Login Register  

Author Topic: "moveingunner" problem  (Read 2068 times)

0 Members and 1 Guest are viewing this topic.

Offline Yasirotta

  • Members
  • *
"moveingunner" problem
« on: 01 Sep 2008, 16:05:30 »
I have soldier named as "Guard1". In his init line, i have code "This moveincargo jeep1".
Then i have trigger, and in activation line; Guard1 moveingunner jeep1

As usual, nothing works when i do something  :D
So, how i can move that guard1 from seat to gunner ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: "moveingunner" problem
« Reply #1 on: 01 Sep 2008, 20:38:45 »
Something like:

Guard1 action ["moveToGunner", jeep1]


Planck
I know a little about a lot, and a lot about a little.

Offline Gcfungus

  • Members
  • *
Re: "moveingunner" problem
« Reply #2 on: 01 Sep 2008, 22:45:22 »
You could also use:
Code: [Select]
Guard1 moveingunner jeep1That would make him move instantly though. If that's a problem (like for a cutscene) then don't use it, but if it happens where players can't see, it would work more easily.
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: "moveingunner" problem
« Reply #3 on: 02 Sep 2008, 16:20:09 »
Just assign him as gunner assignAsGunner. For the realistic effect, unassign him from the vehicle and eject him. Wait a second and then assign him as gunner. He will get in himself, unless his stewpid ai pathfinding leaves him stuck on the corner of the bumper.
« Last Edit: 02 Sep 2008, 16:25:52 by Mr.Peanut »
urp!

Offline Yasirotta

  • Members
  • *
Re: "moveingunner" problem
« Reply #4 on: 06 Sep 2008, 15:43:06 »
New problem.

Now gunner works great, and it looks to right direction. However, when friendly guys start firing in another place, this gunner will point them whit his PK. Feels like gunner dont regonize are those friendly on not ? Skill level doesnt help this.

And how to get gunner stay in that vechile ? When vechile take a little damage, gunner will get out from jeep.
« Last Edit: 06 Sep 2008, 15:46:55 by Yasirotta »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: "moveingunner" problem
« Reply #5 on: 07 Sep 2008, 18:09:16 »
If he didn't think they were friendly, he would shoot them!
Is this gunner a member of a player group?

As for gunners getting out of a damaged jeep, there is no fix. That is default AI behaviour. If you really need him to stay in the jeep, then you will have to add an eventhandler to the jeep that keeps it from getting damaged or reduces the damage. Put it in the script were you maker the gunner get in the jeep.

Code: [Select]
myJeep addEventHandler["hit",{(_this select 0) setDamage 0}]or
Code: [Select]
myJeep addEventHandler["hit",{(_this select 0) setDamage (damage _this select 0)*0.5}]
When you want to turn it off:
Code: [Select]
myJeep removeAllEventHandlers "hit"
urp!