OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: kadryl on 21 Sep 2007, 17:20:55
-
Hi,
in attachment is some submission which detected player if he take out his gun from back to hand.
This submission is helpfull for spy, civilian, captive etc. situation.
I use 4+1 triggers and scrip "dis.sqs".
Plz testing this if possible.
Regards
-
may you describe here how do you detect when the player has a weapon in hand? as current dis.sqs does nothing related to weapons.
-
Yep.
I have used 4 small triggers closly player to control his moving body (speed player < 2) and 1 trigger to go away this 4 triggers if player is runing.
-
I see no relation with "in attachment is some submission which detected player if he take out his gun from back to hand".
-
My English is not so brilliant but I try to explain.
.... does nothing related to weapons
– yes, this is true.
Assume:
a) Solder with gun in hand to occupy more area as he take gun back;
b) It is possibility to limited solder area to detect his status (gun in hand area or gun in back area)
c) This limitation must consider if solder moving.
So:
1) I put 4 very small (0.1 m) rectangular triggers closely solder (+0.15 m) on N,E,S, W, directions
2) If solder’s speed > 0 detectors must be away solder (for example +100 m)
3) If solder’s speed == 0 detectors must be close solder.
4) I put 1 trigger to control speed’s of solder to send 4 triggers to the right position (look p.2 or p.3)
Problems:
I found if solder take gun to hand his speed to grow up 1 km/h – this is the reason main triggers has condition player speed < 2.
If solder take gun to hand and firing during running, it is possible to put other trigger condition: player speed >11
I hope it is more clearly now.
-
So you have the theory that when a player takes out his weapon, his speed increases even if the player doesnt move it?
a) A soldier with gun in hand occupies the very same area as with gun in back, the position of the soldier is what counts for triggers, not how fat the soldier is. The the position is within trigger's area, the trigger activates.
So far, this thread seems more a general editing question or topic than a resource.
-
Why you didnt check this mission ?
You say: So you have the theory ....
but I put exemple you didnt.
It is unpleasant for me.
A soldier with gun in hand occupies the very same area as with gun in back, the position of the soldier is what counts for triggers, not how fat the soldier is....
this is false becouse solder with "gun in hand" move his hand to front.
-
You are right, I haven't neither the knowledge nor the practise to discusse about what you try to do or what you have alredy done :dunno: But more than problably it is an outstanding resource that might have great acceptance by the community :scratch: Of course, as long as you are able to convince me that this is even something to be considered a resource for this board, mostly because in my tests it failed always except when you are stopped: I got shot when putting back the weapon after killing some soldiers, or when using binocs (stopped too), I'm free to take out the gun all the time walking backwards, or just walking, I'm also able to take out the gun pressin Z twice to get crouched. Based on your theory about "sizes", if player lay down it occupies more space trigger-wise, right? Something fails, because I'm free to lay down with the weapon in hand.
-
Think you for your attention to this problem.
So this is reson I put mission here not other topic because I looking for way to make this submission better, more usefull.
I see I need make more corrects for triggers distance, init.sqs and speed condition. :whistle:
-
After a few days I found better solution.
This solution based on the player speed of take pistol up from back.
Importent: no rifle here - I coudnt found the speeds of take rifle up.
If you put in triggers condition:((speed player > 0.7) and (speed player < 1.9)) or (speed player > 18)so trigger is activited if man take pistol up only or run with this.
I didnt found problem if used: binocs, walking backwards, walking, take out the gun pressin Z twice to get crouched etc.
For player whose get in car I modify code:
((speed player > .7) and (speed player < 1.18)) or ((speed player > 1.19) and (speed player < 1.9)) or (speed player > 18)
This analize I done on OFP 1.96 (Res) version, no mod and no add addons.
regards
-
With the weapon in back, tap few times E key briefly and you will be discovered.