Function CreatePermanentCorpseLocBJ
- Line
- 3498
- Location
- blizzard.j
- Constant?
- no
- Type
- function
- Arguments
- integer style, integer unitid, player whichPlayer, location loc, real facing
- Returns
- unit
| 3498 | function CreatePermanentCorpseLocBJ takes integer style, integer unitid, player whichPlayer, location loc, real facing returns unit |
| 3499 | set bj_lastCreatedUnit = CreateCorpse(whichPlayer, unitid, GetLocationX(loc), GetLocationY(loc), facing) |
| 3500 | call SetUnitBlendTime(bj_lastCreatedUnit, 0) |
| 3501 | |
| 3502 | if (style == bj_CORPSETYPE_FLESH) then |
| 3503 | call SetUnitAnimation(bj_lastCreatedUnit, "decay flesh") |
| 3504 | call GroupAddUnit(bj_suspendDecayFleshGroup, bj_lastCreatedUnit) |
| 3505 | elseif (style == bj_CORPSETYPE_BONE) then |
| 3506 | call SetUnitAnimation(bj_lastCreatedUnit, "decay bone") |
| 3507 | call GroupAddUnit(bj_suspendDecayBoneGroup, bj_lastCreatedUnit) |
| 3508 | else
|
| 3509 | // Unknown decay style - treat as skeletal.
|
| 3510 | call SetUnitAnimation(bj_lastCreatedUnit, "decay bone") |
| 3511 | call GroupAddUnit(bj_suspendDecayBoneGroup, bj_lastCreatedUnit) |
| 3512 | endif
|
| 3513 | |
| 3514 | call TimerStart(bj_delayedSuspendDecayTimer, 0.05, false, null) |
| 3515 | return bj_lastCreatedUnit |
| 3516 | endfunction
|