Jump to content

Recommended Posts

30 minutes ago, Quack Rejackt said:

but i terrible at communicating 

And so is your English and grammar. :rofl:

 

EDIT: Damn, you already said. Just of been on second page? On mobile. Haha!

  • Like 1

Share this post


Link to post
Share on other sites

You are welcome to ask your question again, try a more plain approach As @pierremgi said. I will reply properly when home. Out atm on mobile.

Share this post


Link to post
Share on other sites

I frankensteined this with my own stupidity and it works. when the hostage picks up the gun. opfor shoot him. game over.
!(HandgunWeapon Miller=="");

 @pierremgi  gave me this bit but i couldnt work out how to merge them. then he got stropy with the COPY/PASTE bit 
({_x in assignedItems Miller} count ["ItemCompass","ItemWatch","ItemMap","ItemGPS"] == 0);

i tried to work it out, but i couldnt. 

I thought this might work.
!(HandgunWeapon, Items Miller==""); It didnt. :(

ok here gose.

The Hostage's Items / belongings are inside a box. cloths, compass, map, watch, the lot. yea. Because he is sat or stood 2ft away from the box, the scroll wheel can access the box's inventory, right ?  but this makes it like a little puzzle game. 
If the player waits for long enough, maybe all of the guards go for a shit or a sleep at some point or something and he can grab his stuff and run. Its really risky iv only made it to the beach a few times and it would piss your mates off if you kept trying to escape. 

anyway, at the moment, the player can go in the box and put all of his cloths and stuff back on and even heal him self. what i want is if the player takes 1 item from that box the condition is triggered and they shoot him because he become greenfor. 

Share this post


Link to post
Share on other sites

@Quack Rejackt  Since you do not appear to be reading your Forum warnings, I will tell you publicly that your behaviour is not acceptable. Please have a read of the Forum rules so that you may adjust your behaviour accordingly. 

  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

If I have understood you then:

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Take

player addEventHandler ["Take",
{
  params ["_unit", "_container", "_item"];
  if !(_item isEqualTo "") then // assuming that if you take nothing, an empty string is returned
  {
    // some code?
    _unit setCaptive false; // no longer captive
  };
}];

Not a trigger method but should work. Not sure what you wanted to happen so you'll have to edit that yourself.

NOT tested!

Share this post


Link to post
Share on other sites

Thanks.
the first bit makes alot of sense up unitll // some code? _unit setCaptive false; // no longer captive. but only because i dont want it messing with all my triggers and conditions. its as if it says if this unit takes any of the possible inventory items then shoot him.

but i i will test it when i wake up. im a bit drunk now.

!(HandgunWeapon Miller=="");

how dose this not work though ?
!(HandgunWeapon, Uniform, Map, watch and what ever~? Miller=="");

Share this post


Link to post
Share on other sites
2 hours ago, Quack Rejackt said:

how dose this not work though ?
!(HandgunWeapon, Uniform, Map, watch and what ever~? Miller=="");

Because it isn't written in a language that Arma understands. You can't just write random words at the game engine and expect positive results.

https://community.bistudio.com/wiki/ArmA:_Introduction_to_Scripting
https://community.bistudio.com/wiki/SQF_syntax

https://community.bistudio.com/wiki/Category:Scripting_Commands

  • Like 2

Share this post


Link to post
Share on other sites
13 hours ago, Quack Rejackt said:

 

its clear what conditions i want. civ picks up hand gun, or map, or his cloths and so on and the condition is met. !(HandgunWeapon Miller=="")
that works. if thats not a clear condition i dont know what its ? 

you even said have you got a unit named miller ? go away and bother someone else. 

 

Just because a thread doesn't belong to his author but can help some other one, and I'm not ready to obey at unfair advice, a trigger condition looks like:

 

(currentWeapon Miller !="") or ({_x in assignedItems Miller} count ["ItemCompass","ItemWatch","ItemMap","ItemGPS"] > 0)

because,in plain language, that means:

if true: Miller unit has a weapon in hand or has a compass, or a watch, or a map, or a GPS in the right slot.

This simple sentence is the intermediate level between an idea and the way it's coded. This work should always be done by any author.

More generally, ban expression like ..".and more", ... "after some"... (you should know how many/when, the computer can't do that for you) and "may be" of course.

 

The  @HazJ  solution with EH "take" is a fine solution, even if I'm not sure sure you can "take nothing". But it's ideal to catch the first take. Just make your code (remember the intermediate level) and kill this EH because you don't need it twice (not mandatory).

 

The setCaptive has no effect on civilian unit (already civilian!).

Well, starting with a civilian unit, (as mentioned sometimes), needs to place this unit on another group (let say independent), or even to make him as a renegade (enemy for all sides).

Miller becomes indep:

_grp = createGroup independent;

[Miller] joinSilent _grp;

in the same scope.

 

BIKI is your friend.

 

  • Haha 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×