Home   Help Search Login Register  

Author Topic: Steam from breath conversion  (Read 11061 times)

0 Members and 2 Guests are viewing this topic.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Steam from breath conversion
« Reply #45 on: 15 Jul 2006, 07:51:55 »
I have my doubts, and I will galdly post them ;D :P :

Quote
the question is, can you make somthing plausable out of this.
You really can't :(
At least not in a form a function, which would be the optimal way..

I mean, if someone has gone prone like 56 minutes ago and you want to check whether he is still prone?
No can do with this method, not with the optimal way..
And still the crouched stance would be missing...

You can easily detect if a unit goes/is going prone with this and I'm sure many have found out this in the past but realised it's not usable in any other way...

Basicly you would need a @ sqs loop, one for each stance running on one soldier, which means like 6 @ loops (9 is the crouch stance would be included) per soldier running constantly (good bye MP with this method ;) ), you do the maths when there are several groups going on the map... ;)

standing_to_prone.sqs (pseudo code)
Code: [Select]
_unit = _this select 0
#detect
call format ["%1_isProne=%2",_unit,false]
publicVariable format ["%1",(call format ["%1_isProne",_unit])]
@(speed _unit)==2.26923
~.01
call format ["%1_isProne=%2",_unit,true]
publicVariable format ["%1",(call format ["%1_isProne",_unit])]
@(speed _unit)>0
goto "detect"
« Last Edit: 15 Jul 2006, 07:54:51 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Steam from breath conversion
« Reply #46 on: 15 Jul 2006, 13:55:15 »
this only lets you know if you're prone or standing... what about crouched?
That's possible, although I aborted the checking of my values while I found out that the values where not consisted on non-flat ground.

HateR_Kint: Quite. But if you can find a better way, I'm all ears. Anything is better than nothing, right? :)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re: Steam from breath conversion
« Reply #47 on: 15 Jul 2006, 18:42:16 »
@hater
you're taking the hard route.  I worked up a beta script to get the stance using this, with only one loop per unit. the problem, however, is that in my long absence i've slipped up on my skills and i keep getting an error
Code: [Select]
"|#|?(_this in _x):TRG_units = TRG_units - [_x]" foreach TRG_units: error invalid number in expression
which doesn't make much sense to me...
i've attached the test mission i'm using and you can take a look at it, maybe figure out what i screwed up... :-\

i think the problem has to do with subtracting arrays but i'm not sure...

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: Steam from breath conversion
« Reply #48 on: 15 Jul 2006, 19:45:21 »
And even if you do get this thing working, you will have to tell people not to use any 3rd party animation packs.

what if this whole time, there really was a get stance comand, but BIS just forgot to put it in the comref. like

stance player

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Steam from breath conversion
« Reply #49 on: 16 Jul 2006, 14:10:22 »
Well there isn't. Bummer. And 3rd party anims are no problem, as we can always get the values for those as well, do a check which pack the player is using and use the corresponding loop.

That still won't solve the problem about flat surface, which is the main concern at the moment - not how the loop should be designed. ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Steam from breath conversion
« Reply #50 on: 19 Jul 2006, 10:13:49 »
Quote
Anything is better than nothing, right?
True..
I'm not saying that this could not be used in some way or form, I'm merely pointing out why this is not the best method.. ;)

Quote
do a check which pack the player is using and use the corresponding loop.
How are you planning to do that check ???
I have not used any anims packs so do they come with something that you can use in that checking process..?

Quote
I worked up a beta script to get the stance using this
The error is caused by the '?'..
I'm pretty sure you can't use if-then "inside" forEach..

EDIT:
Quote
you're taking the hard route.
Pseudo code being the key words.. ;)

And why use global variables instead of an array?
You can't publicVariable an array unless you do it one element at a time..
Global arrays/variables are not exactly global in MP..

Also, the forEach route can get hard if the array gets hundreds of elements big.. forEach scans the array from the start to finish element by element..
« Last Edit: 19 Jul 2006, 10:25:28 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Steam from breath conversion
« Reply #51 on: 25 Jul 2006, 15:16:56 »
Quote
ECP uses particles for their ejected shell casings, and these particles come out at the correct height
You sure they don't use the "fired" eventHandler to get the bullets height (among other needed data ) to get the casing to fly out from the right spot? ;)

I tried to make a casing script once that would simulate bolt action rifle and the casing would fly out of the weapon when the rifle was 'bolted' but the main feature killer was the fact that you can't return the unit's stance and weapon direction in any other way than using the fired EH, and obviously as the 'bolting' takes time the weapon could point in some other direction and/or the player to change the stance which made the casing to fly out from a completely wrong place..

EDIT:
Quote
In the latter case, an invisible particle could be created at the player's position with zero velocity, rubbing, and nuetral buoyancy.
I mention this method in earlier posts in this thread, and it did not work...
If you drop a particle to some selection the height of the particle does not change with the unit's stance :(

And what good would creating the particle on the player's position do?
After all the position does not change with the stance..

And as ArmA will feature functions to detect stance why we even discuss this anymore :P
« Last Edit: 25 Jul 2006, 15:25:14 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

DanAK47

  • Guest
Re: Steam from breath conversion
« Reply #52 on: 25 Jul 2006, 22:04:37 »
We could try creating a weak bullet at a given height where it will intersect the unit, and using the dammaged event handler to see which selection it hits.

I'll screw with it after work.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Steam from breath conversion
« Reply #53 on: 26 Jul 2006, 00:24:47 »
How I just love to be the partypooper ;D :P

A few things that are going to be an annoyance:
- You need an addon (for the bullet)
- There will be the flying sound of the bullet, the *whack* when you get hit, the red 'flash' and the random scream by the unit (tested)
- Not just one function (you need at least two different scripts, afaik) (tested)

But the most annoying thing is that it seems the bullet needs to be pretty powerful so that it actually triggers the dammaged EH (with hit=3 it takes a few shots before the EH gets triggered)...
Which means trouble as different units have different armor; civilians, different soldier AddOns..

Maybe you get better results..
« Last Edit: 26 Jul 2006, 00:28:30 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

DanAK47

  • Guest
Re: Steam from breath conversion
« Reply #54 on: 26 Jul 2006, 04:02:15 »
Thought of all that. Just figured I would put the idea out there to see if someone had workarounds.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Steam from breath conversion
« Reply #55 on: 29 Jul 2006, 14:28:18 »
Yeh, I've tried that as well. And it ain't that reliable either, should you get it working. If the unit is running or strafing or something it could hit something that we didn't calculate and thus give the incorrect results. Not good.

Not the mention that you can accidentally kill the unit. Not good either.