Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
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"];
exit

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?

Thanks.


Author Message

HazJ  



Posts: 157
Rank:


Level: Member

Country: uk
Location: Somewhere
Occupation:
Age:
In-game name: Haz

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

Haz

Advertisement


Author Message


Posts: 1
Rank:


Level: Member

Country: uk
Location: W*****hampton
Occupation: Converting caffeine into code.
Age:
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...