Rivals of Aether

Rivals of Aether

Kirby
 This topic has been pinned, so it's probably important
dragon balls  [developer] Oct 5, 2019 @ 6:10pm
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
}
Last edited by dragon balls; Mar 17, 2020 @ 2:13pm
< >
Showing 1-2 of 2 comments
dragon balls  [developer] Oct 5, 2019 @ 6:11pm 
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
}
}
}
dragon balls  [developer] Mar 17, 2020 @ 2:12pm 
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
}
< >
Showing 1-2 of 2 comments
Per page: 15 30 50