Rivals of Aether

Rivals of Aether

Kirby
 此主题已被置顶,因此可能具有重要性
anguish ♥♥  [开发者] 2019 年 10 月 5 日 下午 6:10
Custom Copy Ability Resources
BASIC TEMPLATE:
@init.gml
kirbyability = 16;
swallowed = 0

@update.gml

if swallowed { //Kirby ability script starts here
swallowed = 0
//Define any assets kirby might need to grab from YOUR CHARACTER
var ability_spr = sprite_get("YOUR KIRBY SPRITE HERE");
var ability_hurt = sprite_get("YOUR KIRBY HURTBOX HERE")
var ability_icon = sprite_get("YOUR KIRBY ABILITY ICON HERE") //Optional
with enemykirby { //Define AT_EXTRA_3 for Kirby, using your asset variables where necessary in place of sprite_get or sound_get
...
...
newicon = ability_icon //Optional, replaces the kirby ability icon
} //Kirby ability script ends here
}
最后由 anguish ♥♥ 编辑于; 2020 年 3 月 17 日 下午 2:13
< >
正在显示第 1 - 2 条,共 2 条留言
anguish ♥♥  [开发者] 2019 年 10 月 5 日 下午 6:11 
How to push updates into Kirby/Other characters (originally by Archytas):

1. In update.gml along with copying the attack values to the enemy kirby, set an arbitrary value in an unused window for checking later. For example:
set_window_value(AT_EXTRA_3, 2, AG_WINDOW_ANIM_FRAMES, 'value');

2. In whatever script you want to have kirby run:

if enemykirby != undefined { //if kirby is in a match & has swallowed the character
with oPlayer { //Run through all players
if (get_window_value(AT_EXTRA_3,2,AG_WINDOW_ANIM_FRAMES) == 'value') { //Arbitrary value in an unused window
//your code here
}
}
}

3. To simulate attack_update, use this in update.gml:

if enemykirby != undefined { //if kirby is in a match & swallowed
with oPlayer { //Run through all players
if ((state == PS_ATTACK_AIR || state == PS_ATTACK_GROUND) && attack == AT_EXTRA_3) {
//your code here
}
}
}
anguish ♥♥  [开发者] 2020 年 3 月 17 日 下午 2:12 
Kirby also looks for a custom copy ability icon by sending "newicon" over, for example:

var myicon = sprite_get("kirby_icon")
with enemykirby {
newicon = myicon
}
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50