Browse Source

add rolling and double jumping to assassin

master
Alison Watson 2 months ago
parent
commit
50e9624ff8
5 changed files with 40 additions and 5 deletions
  1. BIN
      pk7/lsounds/PlayerA/DoubleJump
  2. BIN
      pk7/lsounds/PlayerA/Roll
  3. +33
    -3
      pk7/lzscript/5_Assassin/Assassin.zsc
  4. +2
    -0
      pk7/sndinfo.txt
  5. +5
    -2
      text/sound/player.a.txt

BIN
pk7/lsounds/PlayerA/DoubleJump View File


BIN
pk7/lsounds/PlayerA/Roll View File


+ 33
- 3
pk7/lzscript/5_Assassin/Assassin.zsc View File

@@ -15,9 +15,39 @@ class Lith_AssassinPlayer : Lith_Player {
Tag "Assassin";
}

override void GiveDefaultInventory() {
Super.GiveDefaultInventory();
Lith_GiveDefWeapon("Lith_DualPistols");
private int m_dodgeDbc;

override void giveDefaultInventory() {
super.giveDefaultInventory();
lith_giveDefWeapon("Lith_DualPistols");
}

override void tick() {
if(health > 0) {
if(m_dodgeDbc) {
if(m_dodgeDbc < 20) {
vel.x *= 0.9;
vel.y *= 0.9;
}
m_dodgeDbc--;
} else if(player) {
if(player.buttons & BT_SPEED) {
let a = angle -
atan2(player.cmd.sideMove, player.cmd.forwardMove);
let c = cos(a) * 20;
let s = sin(a) * 20;
a_changeVelocity(c, s);
a_startSound("player/assassin/roll", lch_body);
m_dodgeDbc = 40;
} else if(!(player.oldButtons & BT_JUMP) && player.buttons & BT_JUMP && !player.onGround) {
vel.z = 16.0;
a_startSound("player/assassin/djump", lch_body);
m_dodgeDbc = 40;
}
}
}

super.tick();
}
}



+ 2
- 0
pk7/sndinfo.txt View File

@@ -334,6 +334,8 @@ $playersound assassin male *pain50 lsounds/PlayerA/Pain
$playersounddup assassin male *pain25 *pain50
$playersound assassin male *grunt lsounds/PlayerA/Grunt
$alias player/assassin/step player/step
player/assassin/roll lsounds/PlayerA/Roll
player/assassin/djump lsounds/PlayerA/DoubleJump
$playersound cybermage male *death lsounds/PlayerC/Death
$playersound cybermage male *xdeath lsounds/PlayerC/XDeath
$playersound cybermage male *pain100 lsounds/PlayerC/PainSmall


+ 5
- 2
text/sound/player.a.txt View File

@@ -16,8 +16,11 @@ $playersound assassin male *pain50 Pain # //
$playersounddup assassin male *pain25 *pain50 # //
$playersound assassin male *grunt Grunt # //

player {
$alias assassin.step = step
player.assassin {
$alias step = .player.step

roll Roll # Dark Souls
djump DoubleJump # //
}

# EOF

Loading…
Cancel
Save