Linear (Tangential) Splash

https://github.com/bwapi/bwapi
pastelmind
Posts: 57
Joined: Fri Nov 19, 2010 7:50 am

Linear (Tangential) Splash

Postby pastelmind » Sun Aug 14, 2011 3:36 am

Heya. I'm trying to make a weapon that cuts through multiple enemies in a x-shaped line, dealing splash damage.

I tried to do this by setting the weapon behavior to "Appear on Target Unit", and making the primary weapon flingy spawn multiple image overlays. To mark their offsets, I made a separate *.LO file. The iscript is as follows:

Code: Select all

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 978 OpticFlareLarge (thingyTmeFlshL.grp)
# 977 OpticFlareMedium (thingyTmeFlshM.grp)
# 976 OpticFlareSmall (thingyTmeFlshS.grp)
.headerstart
IsId              391
Type              2
Init              OpticalFlareHitInit
Death             OpticalFlareHitDeath
GndAttkInit      OpticalFlareHitDeath   ## [NONE]
AirAttkInit      [NONE]
.headerend
# ----------------------------------------------------------------------------- #

OpticalFlareHitInit:
   dogrddamage   ##
   playfram          0
   wait              1
   playfram          1
   wait              1
   playfram          2
   wait              1
   playfram          3
   wait              1
   playfram          4
   wait              1
   playfram          5
   wait              1
   playfram          6
   wait              1
   playfram          7
   wait              1
   playfram          8
   wait              1
   goto              OpticalFlareHitDeath

OpticalFlareHitDeath:
   wait              1
   end               

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 147 Scarab (protosssapper.grp)
.headerstart
IsId             160
Type             2
Init             ScarabInit
Death            ScarabDeath
GndAttkInit      ScarabDeath   ## [NONE]
AirAttkInit      [NONE]
.headerend
# ----------------------------------------------------------------------------- #

ScarabInit:
   wait      1
   sigorder   1
   wait      1

ScarabDeath:
   imgol      976 0 0
   imguluselo   976 0 0
   imguluselo   976 0 1
   wait      1
   imguluselo   976 0 2
   imguluselo   976 0 3
   imguluselo   976 0 4
   imguluselo   976 0 5
   wait      1
   imguluselo   976 0 6
   imguluselo   976 0 7
   imguluselo   976 0 8
   imguluselo   976 0 9
   wait      1
   imguluselo   976 0 10
   imguluselo   976 0 11
   wait      1
   end


Now, the weapon looks as expected in-game, but instead of dealing splash damage along the X-shape, all of the attacks are focused on the center of the target. Does anyone have ideas on how to fix this problem?

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 1 guest