Home   Help Search Login Register  

Author Topic: ECP + "Shell125" CreateVehicle [x,y,z]  (Read 914 times)

0 Members and 1 Guest are viewing this topic.

Bobor SK

  • Guest
ECP + "Shell125" CreateVehicle [x,y,z]
« on: 11 Nov 2005, 14:53:28 »
Hi,
Ive got one problem with ECP. When I create explosion by "Shell125" CreateVehicle [x,y,z], it doesnt have features like whiz or splash on water. ???
How to turn it on?

Sry, if it was here yet, but I didnt find it.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:ECP + "Shell125" CreateVehicle [x,y,z]
« Reply #1 on: 12 Nov 2005, 09:48:18 »
I wont say this definitively, but I think that ECP relies on eventhandlers to manage sound and effects for ammunition.

If you like, you could have a look in the ECP mod and borrow their particle effect and sfx, managed with a script of your own

Bobor SK

  • Guest
Re:ECP + "Shell125" CreateVehicle [x,y,z]
« Reply #2 on: 12 Nov 2005, 10:41:52 »
I found shellwhiz.sqs, I know how to call it, but what the hell mean _a,_b,_c,_d,_e ... I know what it is, but I dont know, what to assign there ...
theres something like
_a = _this select 0
_b = _this select 1
_c = _this select 2
_d = _this select 3
_e = _this select 4

but whats under _a? Position? And under _b?? :-[
« Last Edit: 12 Nov 2005, 10:42:33 by Bobor SK »

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:ECP + "Shell125" CreateVehicle [x,y,z]
« Reply #3 on: 13 Nov 2005, 01:37:39 »
Aight.

I'm assuming that it is bullet_whiz\shellfired.sqs that you are after, since you mentioned shells before.

I've waded through ECPDatabase.ldf.sqf, and I think I've located the enigmatic 'ECP_resources select 41' which controls fire events. The interpretted version of shellwhiz looks something like this:

Code: [Select]
_firer = _this select 0
;firer

_ammo = _this select 1
;fired thing

_dirOfAmmo = _this select 2
; f (dir of b)

_posOfAmmo = _this select 3
; e = pos of b

_logic = _this select 4
; g (ecp internal select 69) select 0
; a game logic

_ammoFormat = _this select 5
; c (format of ammo)


? isnull _ammo:[_firer,_posOfAmmo,_dirOfAmmo,_ammoFormat] exec format["%1explosions\impact_shock.sqs",ECP_path];[_firer,_posOfAmmo] exec format["%1dsai\incom_scream.sqs",ECP_path];goto "4"
_shellWhiz = "shellin9"
_newPosOfAmmo = getpos _ammo
_logic setpos _newPosOfAmmo
_logic say _shellWhiz
#1
_firerToAmmo = _firer distance _ammo
~0.001
? isnull _ammo:[_firer,_newPosOfAmmo,_dirOfAmmo,_ammoFormat] exec format["%1explosions\impact_shock.sqs",ECP_path];[_firer,_newPosOfAmmo] exec format["%1dsai\incom_scream.sqs",ECP_path];goto "2"
_newPosOfAmmo = getpos _ammo
_logic setpos _newPosOfAmmo
goto "1"
#2
? _firerToAmmo <= 200:_logic setdammage 1; goto "3"
~0.5
_logic setdammage 1
#3
~0.1
_logic setdammage 0
#4
ECP_internal set [69, (ECP_internal select 69) + [_logic]]
exit

As you can see there's still a bit of peripheral 'fluff' I've yet to weed out to get this working as an in mission script. I will post  the finished version in a little while.

Bobor SK

  • Guest
Re:ECP + "Shell125" CreateVehicle [x,y,z]
« Reply #4 on: 13 Nov 2005, 12:45:29 »
It works finally!! :)
I called it

boom_bomb = "Shell120" createvehicle [getpos boom_pos select 0,getpos boom_pos select 1,10]
boom_logic = "Logic" CreateVehicle getpos boom_pos
[boom_pos,boom_bomb,0,getpos boom_pos,boom_logic,Shell120] exec "\ECP_Effects\bullet_whiz\shellfired.sqs"

Thanks much!! 8) :D

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:ECP + "Shell125" CreateVehicle [x,y,z]
« Reply #5 on: 13 Nov 2005, 13:01:16 »
Ah... excellent. No worries m8!  8)