Home   Help Search Login Register  

Author Topic: createVehicleLocal  (Read 3948 times)

0 Members and 1 Guest are viewing this topic.

Offline Rommel92

  • Members
  • *
createVehicleLocal
« on: 08 Oct 2009, 11:20:50 »
Code: [Select]
_ehID = player addEventHandler ["Fired", {
_s = "B_545x39_Ball" createvehiclelocal [0,0,0];
}];

Expected Results:
Player would see a bullet created at position at [0,0,0]
No other players would see it.

Actual Results:
Player see's a bullet created at position at [0,0,0]
All other players see the bullet creation at [0,0,0].

Tested with "UAZ_RU"

Expected Results:
Player would see a UAZ created at position at [0,0,0]
No other players would see it.

Actual Results:
Player see's a UAZ created at position at [0,0,0]
No other players see it.

---

Conclusion: Somehow bullets are special.
Despite advertisement of the contrary, the Fired EH is not GLOBAL.
« Last Edit: 22 Jun 2013, 05:43:31 by Rommel92 »

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re: createVehicleLocal
« Reply #1 on: 13 Oct 2009, 18:34:19 »
Good find..

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: createVehicleLocal
« Reply #2 on: 14 Oct 2009, 00:23:01 »

 i like things like this, always good to see people still delving so deep into the whole thing.

 If i may eliminate the possible to seek the impossible , may i ask without any insult intended .

Player see's a bullet created at position at [0,0,0]
All other players see the bullet creation at [0,0,0].

 your local fireguy is not firing a weapon that fires and actual B_545x39_Ball  is he ? Had to ask sorry ;).

 also just for test purpose Bullets are a simple set of co-ordinates not a model i believe , however a shell can use an actual p3d model , is result same  ?

 not sure what i aim to gain from my questions but i like all this kind of testing , sometime very useful things are obtained.

 
I love ofp

Offline Rommel92

  • Members
  • *
Re: createVehicleLocal
« Reply #3 on: 14 Oct 2009, 22:59:22 »
Haha.

No.

...

:P

I believe you may be right with bullet not using a model, which could be its specialty, however it is still an entity that can be handled as an object.

I also must revoke the following statement:
Code:

Despite advertisement of the contrary, the Fired EH is not GLOBAL.


After speaking with Suma on the matter, he showed me that it is merely the effect of this script that is local, not the arguments. Little confusion was there at first.  :whistle:

None the less; annoying bug, causes lag which shouldn't occur.


Edit by i0n0s:
Mixed edit and quote button...
« Last Edit: 15 Oct 2009, 00:12:15 by i0n0s »

Offline i0n0s

  • Moderator
  • *****
Re: createVehicleLocal
« Reply #4 on: 15 Oct 2009, 00:13:07 »
Suma talked about addEventhandler or the script started by the handler?

Offline tcp

  • Members
  • *
    • Violator Gaming
Re: createVehicleLocal
« Reply #5 on: 15 Oct 2009, 00:24:50 »
Maybe the bullet just creates a "blast" that is broadcast globally. I would think all damage needs to be global.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: createVehicleLocal
« Reply #6 on: 15 Oct 2009, 12:47:51 »
I think all bullets and shells use the same model, apart from tracer ammo.

\ca\weapons\shell


Planck
I know a little about a lot, and a lot about a little.

Offline Rommel92

  • Members
  • *
Re: createVehicleLocal
« Reply #7 on: 16 Oct 2009, 01:10:54 »
Suma talked about addEventhandler or the script started by the handler?

The event of the handler, the Fired Event is global, but the arguments are local. All machines fire off the fired event handler, but it is not added globally when you add the script to the unit (stupid mistake really).

Maybe the bullet just creates a "blast" that is broadcast globally. I would think all damage needs to be global.

But players are capable of visually receiving the ricochets, I understand the concept, but if it was just damage, it would just be observed as to happen for no apparent reason; and there would be minimal desync if no damage occured at all (ie 90 bullets shot into the sky still causes small desync? No impacts.)

Offline i0n0s

  • Moderator
  • *****
Re: createVehicleLocal
« Reply #8 on: 16 Oct 2009, 01:17:46 »
Ok @ Rommel,
so addEventhandler["Fire",...] has a global argument (unit can be on every client) and local effect since the handler only launches on the script where the handler was added.
Thanks for the cleanup, so the fire handler is not special to other events.

Offline Rommel92

  • Members
  • *
Re: createVehicleLocal
« Reply #9 on: 16 Oct 2009, 01:21:20 »
Yes that is correct, however the main issue here (as to which Suma has not given any insight to) is the bullets being broadcasted when they are created locally!?

 :blink:

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: createVehicleLocal
« Reply #10 on: 16 Oct 2009, 10:40:02 »

 Maybe the bullet has a special init propperty itself, such as Simulation ="xxx" ,not at my gaming pc at the moment so not sure if simulation properties are applied to bulletcore or not.
I love ofp

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: createVehicleLocal
« Reply #11 on: 16 Oct 2009, 14:27:57 »
Aye, bullet has simulation = "shotBullet";, shell has simulation = "shotShell"; in BulletCore and ShellCore respectively.


Planck
I know a little about a lot, and a lot about a little.