Forum Jump :

Author Message

Posts: 2

Level: Member

Country: au
In-game name:

#1 Posted at 2013-03-07 00:14        
Hi All,

I have been working on a script for a mission to allow a player to kill an enemy and steal his clothes.

;Uniform steal action by adamjm
_deadguy = _this select 0
_caller = _this select 1
_id = _this select 2

;Get uniform of dead soldier
_clothes = uniform _deadguy

;remove whatever player are wearing first
~(random 0.3)
;remove existing uniform
removeUniform _caller

;remove headgear too - only works after uniform
~(random 0.3)
removeAllAssignedItems _caller
~(random 0.3)
;remove webbing / cargo containers as well - optional
;removeAllContainers _caller

~(random 0.3)
;add dead person uniform
_caller addUniform _clothes
~(random 0.3)
;remove clothes from deadguy so it doesn't look like you magically 

cloned his clothes
removeUniform _deadguy

;remove action
_deadguy removeAction _id

titletext ["You have changed clothes","plain"];

Please see youtube demonstration of where I am at and the issue I've encountered.

For some reason you can steal their clothes when they are alive, but if you shoot them first (as you would in a mission) you cannot.

It seems to me that when a unit is dead it is no longer wearing that uniform name, so the script can't use it anymore. The unit name still can be used because you can still remove their clothes. It is really weird.

Any ideas?


Author Message


Posts: 165

Level: Member

Country: uk
Location: [0, 0, 1000]
Occupation: Full Stack Developer
Age: 23
In-game name: Haz

#2 Posted at 2013-03-16 02:42        
Awesome, hope you continue to search for the problem/bug thingy...



Author Message

Posts: 1

Level: Member

Country: uk
Location: W*****hampton
Occupation: Converting caffeine into code.
In-game name: Lowkee

#3 Posted at 2013-06-10 20:49        
Hey adamjm,

I've created and uploaded a working example mission for you to give a whirl.
VIDEO HERE: Mission download link can be found in the description

I will think of something to go here someday...