Home   Help Search Login Register  

Author Topic: Immovable moving?  (Read 1148 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Immovable moving?
« on: 12 Jul 2005, 22:35:59 »
I have a unit that is part of a group of soldiers.  In the init field of this particular unit I give it a: doStop, disableAI"move" and disableAI"target" commands, it is also has its weapons removed, setCaptive is true, and I have made it unkillable.

I want that unit to remain in one place for hours if necessary, even if the squad it belongs to is attacked.  Most of the time it does exactly that, very rarely it moves.

I have now put this unit in a group all on its own so it will not be getting any orders from the group leader.

This is an intermittent problem that is only noticeable some hours into the mission - so it is quite difficult to test.

Am I missing anything?

(I know I could setPos it to the required location when the player is about - but I would prefer not to do this.)


qqqqqq

  • Guest
Re:Immovable moving?
« Reply #1 on: 12 Jul 2005, 23:09:49 »
How does it move?    

Do you suspect a game code problem, whereby the loon drifts sideways from his designated spot because the game loses track of where he should be?     Or a gameplay issue, whereby he runs from A to B because that is what he is supposed to do under very special circumstances?   Or a randomisation issue, whereby he runs at the behest of the game's randomiser routines?

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Immovable moving?
« Reply #2 on: 13 Jul 2005, 06:56:57 »
Would it work for you to 'camcreate' the unit instead of using a 'real' one? Camcreated units are static objects, so they shouldn't have any problem with moving.

If you later on need this unit to move, then you could 'createunit' a real one and swap them out.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Immovable moving?
« Reply #3 on: 13 Jul 2005, 07:55:33 »
How does he move?  Well most times he doesn't move at all.  He is a policeman and I noticed that the little animations each unit makes will overtime cause a policeman to move forward if he is holding a weapon - so I take that from him and usually he stay where he is.  I have him on the first floor (2nd if you are American) of a building, around which there is often fighting.  Previously he was part of a group that were standing outside the building.  During a lot of beta testing - on two occasions only he was found outside the building.  On one of these occasions the building had been destroyed so that is understandable and fixable.  On the other occasion the building had not been destroyed.  

I had not thought of camcreating him.  I might do that, just in case anyone sees him, and then swap him for someone 'live'.  That would have the added benefit of making him a bit of a threat - the disableAI currently makes him a bit of a pushover.  I feel better about doing this today than I did yesterday.



Offline SEAL84

  • Members
  • *
  • Always lurking
Re:Immovable moving?
« Reply #4 on: 16 Jul 2005, 00:25:17 »
Is he going prone because of the fighting outside?  I've had this happen to sentries I've wanted to stay in one place on a rooftop - they go prone, clip through the building and plummet to their deaths, or they end up several feet from where I started them - every time they go prone and get up they go forward a tiny bit.

Have you tried setunitpos up'ing him?

Offline Blanco

  • Former Staff
  • ****
Re:Immovable moving?
« Reply #5 on: 16 Jul 2005, 01:39:24 »
If you want a unit to stay in one place only, simply put him in an constant animation,
With "constant" I don't mean a loop, there are plenty of anims where the unit got stuck in the anim.
To disable this, use

unitname switchmove ""

...but I guess you allready knew that. :)
 
« Last Edit: 16 Jul 2005, 01:42:29 by Blanco »
Search or search or search before you ask.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Immovable moving?
« Reply #6 on: 16 Jul 2005, 06:31:10 »
Thanks guys.  I had him CARELESS at that point so he shouldn't go prone, and Blanco yes I did 'know' about the constant animation, but it just never occurred to me to solve the problem this way.  Good thinking, thanks.

Anyway I have now solved the problem.
1. I have a script that prevents the building from being destroyed until this guy is dead
2. I have this guy and his companions on an offshore island until the player enters the building.

A reduction in realism to prevent an unreal situation occurring.

Thanks everyone for your suggestions.  Even where I didn't use them I learnt something.
« Last Edit: 16 Jul 2005, 06:31:45 by THobson »