Home   Help Search Login Register  

Author Topic: "Sleeper" Units  (Read 842 times)

0 Members and 1 Guest are viewing this topic.

Bronski

  • Guest
"Sleeper" Units
« on: 20 Jan 2003, 07:51:21 »
Basically what i am trying to do is as follows:  I want to have units that will not attack the player, nor will the player's group attack them.  

Ex:  Your soldiers take a town, enemy soldiers dead, plus there are civilians around.  When the "sleepers" are activated they will pull out their weapons and attack your soldiers.

I know about the setcaptive command but i need to have the people armed.  Also, i'd like to know if there is a way to make it where the player's soldiers won't identify/call out the enemies location on the "sleepers".

Most likely the "sleepers" would only have grenades or pistols, so the only way you know they were armed was the position they are standing in.

Any idea's or help would be greatly appreciated.

MorMel

  • Guest
Re:"Sleeper" Units
« Reply #1 on: 20 Jan 2003, 10:58:28 »
What if you remove all weapons from the 'Sleeper', set him captive and disable his AI (Stop command)?

For example:

;Sleep
removeallweapons _sleeper
_sleeper setcaptive true
_sleeper Stop true

;Awake
_sleeper addmagazine "handgrenade"
(Repeat this command many times you want, until the unit is saturated)

_sleeper addmagazine "WeaponName"
_sleeper addweapon "WeaponName"
(In this order, the added magazine will be automaticaly loaded to the 'Sleeper''s gun)

_Sleeper Stop false
_sleeper setcaptive false

---------

If you don't want to remove the unit's magazines you could just remove its weapon...

Hope this help! ;D

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:"Sleeper" Units
« Reply #2 on: 20 Jan 2003, 12:20:33 »
Make them captive (your team will not attack them nor acknowledge their presence), and then set their combat mode to "Green" (groupLeader setCombatMode "GREEN"). This will stop them from attacking you in turn.

G'luck!   ;)

EDIT: And when you want them to un-sleep, you just set their combatmodes to "RED" and un-captivate them ;D

Wolfrug out.
« Last Edit: 20 Jan 2003, 12:21:44 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Bronski

  • Guest
Re:"Sleeper" Units
« Reply #3 on: 20 Jan 2003, 15:51:18 »
I'll try both.  Thank you.

I thought it would be fun to try and make the player paranoid.  Plus i may add a suicide bomber to the hostages.  Somehow make him look or act differently from the other hostages.  You have to spot him/her and take them out.  If not, they will blow their bomb on the transport as they leave.


Bronski

  • Guest
Re:"Sleeper" Units
« Reply #4 on: 20 Jan 2003, 17:02:12 »
I'm making them captive and my soldiers will not fire on them but they will still identify them.

I'm using:  unitname setCaptive true

Is there another command that will stop them from identifying the sleeper soldiers?  When they are identified the guys do not have weapons.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:"Sleeper" Units
« Reply #5 on: 20 Jan 2003, 17:23:10 »
True, captive units will still make AI enemy's heads turn altough won't shoot at them.

You could try to make the non-captive soldiers

unitname disableai "autotarget"

but then again there's no spell to make them autotarget again if you want them to.. unless you want to command them with dotarget the whole rest of the mission  :P :)


Also if your familiar with the mission.sqm  file and what it holds in you could try to change the sleeping soldiers side to CIV or GUER.. but that's kind of a long shot too.   ;D


Then you could unitname setbehaviour "careless" the non-sleeping soldiers, but with careless they look and act like the retunr of the living dead (+in drugs).


Erm... heh.. so go figure  :-\ :-* ;D

edit: whoa
hold on there I just stumbled into this lil baby

friendly
Compatibility:
    Version 1.78 required.
Type of returned value:
    Side
Description:
    Friendly side (friendly to all units).

It doesn't say how you operate it.. maybe it's like most of the commands
unitname Friendly
or
unitname Friendly true/false

try it out maybe it will work  :D
« Last Edit: 20 Jan 2003, 17:27:57 by Artak »
Not all is lost.

Bronski

  • Guest
Re:"Sleeper" Units
« Reply #6 on: 20 Jan 2003, 22:06:06 »
I think i may have been going about this question all wrong.  I really don't need these guys to put up much of a fight, they will most likely be dead within a few seconds.  Basically i just want them to make the player paranoid.

Is there a way to make civilians attack the soldiers after a trigger is set off?  Maybe using the dofire command or one of those.

All they need to do is fire on the team and the team be able to target them and take them out.